Back
Guild icon
Qiskit Global Summer School
Lab Reference / discussion-reference
Avatar
Anonymous BOT 18-Jul-20 01:05 PM
Your hand has been raised! A mentor will drop in as soon as they are available.
Avatar
Anonymous 18-Jul-20 11:07 PM
Ok
Avatar
Anonymous 19-Jul-20 06:43 AM
Hello!!
@Anonymous Do you have any query?
Avatar
Anonymous 19-Jul-20 06:50 AM
It has been resolved.
Avatar
Anonymous 19-Jul-20 06:51 AM
That's nice!! 🙂
Avatar
Anonymous 19-Jul-20 06:54 AM
@Anonymous is it mandatory to install qiskit Libraries beforehand?
Avatar
Anonymous 19-Jul-20 06:55 AM
@Anonymous It would suggest you to install it since that's what we'll be taught through the lectures
Avatar
Anonymous 19-Jul-20 06:55 AM
@Anonymous thanks!
Avatar
Anonymous 19-Jul-20 06:57 AM
@Anonymous You can use IQX Platform too.
👍 1
All libraries are preinstalled there.
Avatar
Anonymous 19-Jul-20 06:59 AM
@Anonymous okayy! Thanks!
Avatar
Anonymous 19-Jul-20 07:34 AM
! raisehand
Can we use online jupyter notebook by ibm quantum experience for this?
Avatar
Anonymous 19-Jul-20 07:54 AM
! raisehand
Avatar
Anonymous 19-Jul-20 07:57 AM
@Anonymous I think there's no space between the exclamation mark and "raisehand"
Avatar
Anonymous BOT 19-Jul-20 07:57 AM
Your hand has been raised! A mentor will drop in as soon as they are available.
Avatar
Anonymous 19-Jul-20 07:59 AM
@Anonymous Sure feel free to use that.
Avatar
Anonymous 19-Jul-20 08:00 AM
Ohh thanks
Avatar
Anonymous 19-Jul-20 10:40 AM
@Anonymous You can use IQX Platform too.
What is IQX Platform ?
Avatar
Anonymous 19-Jul-20 10:52 AM
Program real quantum systems with the leading quantum cloud application.
👍 2
Avatar
Anonymous 19-Jul-20 10:54 AM
@Anonymous thx!
Program real quantum systems with the leading quantum cloud application.
Avatar
Anonymous BOT 19-Jul-20 01:29 PM
Your hand has been raised! A mentor will drop in as soon as they are available.
Avatar
Anonymous 19-Jul-20 01:30 PM
@Anonymous how do we install qiskit libraries ? Is it necessary? And is the the alternative to use IQX platform?
Avatar
Anonymous 19-Jul-20 01:30 PM
@Anonymous Hey! Just wanted to know what the discussion about qiskit libraries are. How and where do we install them (assuming i dont use IQX)? (edited)
Avatar
Anonymous 19-Jul-20 01:31 PM
👍 2
Avatar
Anonymous 19-Jul-20 01:32 PM
@Anonymous @Anonymous this video also has the information you need. https://www.youtube.com/watch?v=M4EkW4VwhcI (edited)
Learn how to install Qiskit, the open source quantum computing framework, onto a Mac, Windows and Linux machine. Your formal invite to weekly Qiskit videos ► https://ibm.biz/q-subscribe Episode 3 will come out August 16th! Getting Started – https://ibm.biz/qiskit-github Docu...
👍 1
Avatar
Anonymous 19-Jul-20 01:33 PM
Thanks a ton! That answers my query@Anonymous Hernandez @Anonymous
👍 1
Avatar
Anonymous 19-Jul-20 01:33 PM
@Anonymous and @Anonymous above are the resources. IQX have everything preinstalled just in case you need it.
👍 1
Avatar
Anonymous 19-Jul-20 01:33 PM
@Anonymous Hernandez @Anonymous Thank You so much
👍 2
Avatar
Anonymous 19-Jul-20 01:34 PM
@Anonymous Thanks! Now it's all clear. Will get to setting it all up ASAP
👍 2
Avatar
Anonymous 19-Jul-20 01:34 PM
@Anonymous thanks!
👍 2
Avatar
Anonymous BOT 19-Jul-20 02:20 PM
Your hand has been raised! A mentor will drop in as soon as they are available.
Avatar
Anonymous 19-Jul-20 02:20 PM
Does having a "labstudent" tag ensure that we are eligible to get a certificate (provided we turn in the assignments of course)?
Avatar
Anonymous 19-Jul-20 02:20 PM
I have a "labstudent" tag. Does that mean I am eligible to get a certificate?
Oh cool, same question as @Anonymous ! Sorry
Avatar
Anonymous 19-Jul-20 02:22 PM
check your email guys, an email from IBM should be there, the attachment in the email (AttendeeGuide_QiskitGlobalSummerSchoolLabStudent) should answer all your questions
👍 1
Avatar
Anonymous 19-Jul-20 02:25 PM
@Anonymous and @Anonymous Yes, good luck for assignments.
👍 3
Avatar
Anonymous 19-Jul-20 02:26 PM
Thank you so much !@Anonymous
👍 3
Avatar
Anonymous 19-Jul-20 02:26 PM
@Anonymous Thanks a ton mate! Was a wee bit worried about it...
👍 2
Avatar
Anonymous 19-Jul-20 02:27 PM
Do we need to use Anaconda for virtual enviroments or should we be fine installing packages globally?
Avatar
Anonymous 19-Jul-20 02:34 PM
Do we need to use Anaconda for virtual enviroments or should we be fine installing packages globally?
@Anonymous Houzenga I guess Google Colab will be useful
Avatar
Anonymous 19-Jul-20 02:34 PM
@Anonymous Houzenga You can work on https://quantum-computing.ibm.com it has libraries preinstalled.
Program real quantum systems with the leading quantum cloud application.
Avatar
Anonymous 19-Jul-20 02:35 PM
@Anonymous Houzenga You can work on https://quantum-computing.ibm.com it has libraries preinstalled.
@Anonymous it is free right?
Program real quantum systems with the leading quantum cloud application.
Avatar
Anonymous 19-Jul-20 02:36 PM
Yeah
Also thanks
Avatar
Anonymous 19-Jul-20 02:38 PM
@Anonymous Yes, it's free.
Avatar
Anonymous 19-Jul-20 02:41 PM
Hi every one, is the link for the online lecture and lab available ?
👎 1
Avatar
Anonymous 19-Jul-20 03:26 PM
@Anonymous The lectures link will be posted, but the lab sessions I don't think are available in recording, only those enrolled for labs will have access, I guess.
👍 1
Avatar
Anonymous 19-Jul-20 03:29 PM
will the labs be recorded for those that have access to them?
Avatar
Anonymous 19-Jul-20 03:50 PM
@Anonymous thank you.
Avatar
Anonymous 19-Jul-20 04:19 PM
the study groups will be available after the lectures start ?
Avatar
Anonymous 19-Jul-20 04:28 PM
@Anonymous Alaaraj study groups are under the "study group" section, you'll find em there
Avatar
Anonymous 19-Jul-20 04:39 PM
@Anonymous you mean those groups are the groups that i can join ?
Avatar
Anonymous 19-Jul-20 04:39 PM
@Anonymous Alaaraj yep, or you can find a group in #find-study-group
Avatar
Anonymous 19-Jul-20 04:43 PM
@Anonymous Alaaraj yep, or you can find a group in #find-study-group
@Anonymous you mean by typing the command listed in the attachment from the e-mail right ?
Avatar
Anonymous BOT 19-Jul-20 05:19 PM
Command List (brought to you by !commands) !schedule | View general daily schedule and key times !channels | View linked index of all server channels !raisehand| Let the mentors know you have a question or are looking for support !settimezone | Set your time zone for other students and mentors to see !fun | View some of the miscellaneous fun that may be available !norms | View event norms !CodeofConduct | View Code of Conduct
Avatar
Anonymous 19-Jul-20 05:48 PM
Clarifying along with @Anonymous Alaaraj , @Anonymous using the ;group casual command from within one of the study groups will add us to the group? Is it on a first-come, first-serve basis or do we need to have our request "confirmed" by the group creator?
Avatar
Anonymous 19-Jul-20 05:50 PM
Clarifying along with @Anonymous Alaaraj , @Anonymous using the ;group casual command from within one of the study groups will add us to the group? Is it on a first-come, first-serve basis or do we need to have our request "confirmed" by the group creator?
@Anonymous still don't know how does it work .. even if u check using study group command it seems to be something wrong
;group casual
Avatar
Anonymous 19-Jul-20 05:52 PM
@Anonymous Alaaraj same... I'm new to Discord so this is all a bit unclear to me. Maybe a short README @Anonymous on adding oneself to a study group?
Avatar
Anonymous 19-Jul-20 05:53 PM
i guess if we waited everything will be clear then .. as i said maybe its just a matter of time
👍 1
Avatar
Anonymous 19-Jul-20 05:59 PM
@Anonymous how to know that I have a"labstudent" tag
👍 1
Please answer
Avatar
Anonymous 19-Jul-20 06:02 PM
2 ways, your name is in red and you can click on your name right here on the chat and you see, 3 tags
Avatar
Anonymous 19-Jul-20 06:03 PM
Great
Avatar
Anonymous 19-Jul-20 06:03 PM
@Anonymous Hernandez yeah my name is in red
👍 1
Avatar
Anonymous 19-Jul-20 06:20 PM
@Anonymous Alaaraj same... I'm new to Discord so this is all a bit unclear to me. Maybe a short README @Anonymous on adding oneself to a study group?
@Anonymous to clarify, the material in the onboarding presentation is a great start introducing the #find-study-group, existing study groups, and general commands (for creation and addition), but I'm specifically thinking of a walkthrough for where to use these commands and when -- e.g., "Exhibit A: I want to join Example group, so I click into it (screenshot here) and type the command ;group casual to be added to the group... etc. etc.". A Gist on Github would be the easiest to throw together, I'd imagine (edited)
Avatar
Anonymous 19-Jul-20 06:34 PM
Hi!! I'm red, yes!!!!
Haha
Avatar
Anonymous 19-Jul-20 06:34 PM
@Anonymous you can click on the name and see the tags.
For lab students, Admins are working give them some time and issue will be resolved.
@Anonymous you can join existing study groups, else interact with others and join them.
Avatar
Anonymous 19-Jul-20 06:54 PM
@Anonymous you can join existing study groups, else interact with others and join them.
@Anonymous thanks, but I'm asking specifically about the steps to JOIN a group. I'm assuming I click into one, then type ;group casual to join? If the group limit is set to 10, won't most of these visible groups already be full? Just trying to get some clarity on the actual process, please. Thanks!
Avatar
Anonymous 19-Jul-20 07:11 PM
I already got the email confirmation for the lab, but my name in here still not red lol
Nevermind lol it's already red 🤣
Avatar
Anonymous 19-Jul-20 07:12 PM
same question here as well
Avatar
Anonymous 19-Jul-20 07:12 PM
@Anonymous Most of the channels don't have any limit for now join them and you'll get instructions. Till then, have fun and interact.
@Anonymous Vegi and @Anonymous Admins are working to do it asap.
Avatar
Anonymous 19-Jul-20 07:17 PM
@Anonymous Most of the channels don't have any limit for now join them and you'll get instructions. Till then, have fun and interact.
@Anonymous perfect, thanks for the clarification 👍 appreciate it and looking forward to the course! 😄
👍 1
Avatar
Anonymous 19-Jul-20 09:03 PM
Hi
my name is red bu i cannot send message in the labs section, can anyone help
Avatar
Anonymous 19-Jul-20 09:22 PM
Try to re-phrase your message. Sometimes the bot will think it’s spam or something.
Avatar
Anonymous 19-Jul-20 10:46 PM
Hi
Avatar
Anonymous 19-Jul-20 11:03 PM
HI
Avatar
Anonymous BOT 19-Jul-20 11:19 PM
Daily Schedule Times Presented in EDT (UTC -04) 8:30 AM : Daily Update Posted in Discord & Emailed - including Lecture Link & Password 9:00 AM : Lecture Begins via Crowdcast 12:00 PM : Lecture Ends via Crowdcast 12:30 PM : Lecture Notes & Recording Link Posted in Discord   1:00 PM : Lab Session Access Link & Notebook Posted in Discord 1:30 PM : Previous Day Lab Work Solution Posted in Discord
Avatar
Anonymous 19-Jul-20 11:21 PM
how can we get the daily schedule as per any other time zone?
Avatar
Anonymous 19-Jul-20 11:26 PM
Hi
Avatar
Anonymous 19-Jul-20 11:39 PM
Is it lab student group ?
How i know that i am labstudent ? I got confirmation mail .
Avatar
Anonymous 19-Jul-20 11:42 PM
You are since you are in red
Avatar
Anonymous 20-Jul-20 12:12 AM
Hi
Avatar
Anonymous 20-Jul-20 12:17 AM
;group casual
Avatar
Anonymous 20-Jul-20 12:34 AM
.
Avatar
Anonymous 20-Jul-20 12:34 AM
.
Avatar
Anonymous 20-Jul-20 12:51 AM
.
Avatar
Anonymous 20-Jul-20 12:52 AM
.
Avatar
Anonymous 20-Jul-20 01:02 AM
.
Avatar
Anonymous BOT 20-Jul-20 01:07 AM
Daily Schedule Times Presented in EDT (UTC -04) 8:30 AM : Daily Update Posted in Discord & Emailed - including Lecture Link & Password 9:00 AM : Lecture Begins via Crowdcast 12:00 PM : Lecture Ends via Crowdcast 12:30 PM : Lecture Notes & Recording Link Posted in Discord   1:00 PM : Lab Session Access Link & Notebook Posted in Discord 1:30 PM : Previous Day Lab Work Solution Posted in Discord
👍 1
Set Your Time Zone! Simply input the command : ?setzone timezone Sample timezones: IST, EST, CST, etc... For a full list of available zones, input command : ?zones
Avatar
Anonymous 20-Jul-20 01:10 AM
?zones
? zones
Avatar
Anonymous 20-Jul-20 01:11 AM
;group casual
Avatar
Anonymous 20-Jul-20 01:12 AM
?setzone MST
Avatar
Anonymous 20-Jul-20 01:14 AM
?setzone IST
Avatar
Anonymous 20-Jul-20 01:29 AM
Hi all, use #sandbox channel for setting timezones. (edited)
Avatar
Anonymous 20-Jul-20 01:58 AM
Hello 👋
?set zone EST
Avatar
Anonymous 20-Jul-20 02:50 AM
hi
Avatar
Anonymous 20-Jul-20 02:51 AM
Question on discord- How do i mute notification beeps
Avatar
Anonymous 20-Jul-20 02:57 AM
@Anonymous If you right-click on a channel, you can modify the notification settings to mute or only notify for a mention.
To modify this setting server-wide, right-click on the server in the left-sidebar.
Avatar
Anonymous 20-Jul-20 02:59 AM
👍
Avatar
Anonymous 20-Jul-20 03:04 AM
hello - has anyone tried running the "Hello World" program on qiskit? I ran it in the morning tomorrow and the job is still in the queue! It was number 541 a few hours ago
Avatar
Anonymous 20-Jul-20 03:04 AM
Yes mine too
Avatar
Anonymous 20-Jul-20 03:06 AM
You may use the system with less number of jobs in the queue.
Avatar
Anonymous 20-Jul-20 03:08 AM
How do i select a different system?
I use 'ibmq_16_melbourne'
Avatar
Anonymous 20-Jul-20 03:10 AM
.
Avatar
Anonymous 20-Jul-20 03:11 AM
Melbourne system will be quite busy as it has more qubits and many ppl will try to use it.
I use 'ibmq_16_melbourne'
@Anonymous
Avatar
Anonymous 20-Jul-20 03:11 AM
That's also the system given in the video so that could be another reason
Avatar
Anonymous 20-Jul-20 03:14 AM
This might be of some help
@Anonymous Running the code now gives
👍 1
Avatar
Anonymous 20-Jul-20 03:23 AM
Awesome!!!!!!
So great!
Avatar
Anonymous 20-Jul-20 04:25 AM
?setzone IST
?setzone IST
Avatar
Anonymous 20-Jul-20 04:44 AM
?setzone IST
Avatar
Anonymous 20-Jul-20 04:46 AM
hii
Avatar
Anonymous 20-Jul-20 04:59 AM
I ran the hello world in Jupyter notebook and it ran fast enough
Avatar
Anonymous 20-Jul-20 05:06 AM
?setzone IST
Avatar
Anonymous 20-Jul-20 05:14 AM
?setzone IST
Avatar
Anonymous 20-Jul-20 05:24 AM
?setzone IST
Avatar
Anonymous 20-Jul-20 05:31 AM
@Anonymous Please note that this channel will be cleared in preparation for the lectures today at 6:00 AM EDT (in about 30 minutes). Thank you!
Avatar
Anonymous 20-Jul-20 05:59 AM
Good luck
@Anonymous 541!! i started when it was like to 5 in queue.
👍 1
Avatar
Anonymous 20-Jul-20 06:07 AM
Hello
Avatar
Anonymous 20-Jul-20 07:23 AM
Ok
Avatar
Anonymous 20-Jul-20 07:39 AM
GitHub is where shuklap37 builds software.
Avatar
Anonymous 20-Jul-20 07:45 AM
where will we recieve the links for the lab sessions?
Avatar
Anonymous 20-Jul-20 07:48 AM
@Anonymous same question
Avatar
Anonymous 20-Jul-20 07:55 AM
where will we recieve the links for the lab sessions?
@Anonymous via email mostly
Avatar
Anonymous BOT 20-Jul-20 07:57 AM
Daily Schedule Times Presented in EDT (UTC -04) 8:30 AM : Daily Update Posted in Discord & Emailed - including Lecture Link & Password 9:00 AM : Lecture Begins via Crowdcast 12:00 PM : Lecture Ends via Crowdcast 12:30 PM : Lecture Notes & Recording Link Posted in Discord   1:00 PM : Lab Session Access Link & Notebook Posted in Discord 1:30 PM : Previous Day Lab Work Solution Posted in Discord
Avatar
Anonymous 20-Jul-20 07:58 AM
any one knows why "import qiskit" is not working ?
Avatar
Anonymous 20-Jul-20 07:59 AM
you can use IBM quantum Experience
everything is preinstalled
Avatar
Anonymous 20-Jul-20 07:59 AM
pip install and then try if you are using your local machine
Avatar
Anonymous 20-Jul-20 07:59 AM
@Anonymous Alaaraj
Avatar
Anonymous 20-Jul-20 08:00 AM
pip install and then try if you are using your local machine
@Anonymous K M already did the steps but it says import is not recognized as internal or external
@Anonymous Alaaraj
@Anonymous d u have the link ?
Avatar
Anonymous 20-Jul-20 08:01 AM
i am not able to import qiskit in jupyter , i have completed all the process what should i do
Avatar
Anonymous 20-Jul-20 08:02 AM
Program real quantum systems with the leading quantum cloud application.
sign up and everything is there
Avatar
Anonymous 20-Jul-20 08:03 AM
thanks
Avatar
Anonymous 20-Jul-20 08:03 AM
YW
Avatar
Anonymous 20-Jul-20 08:04 AM
do we have to use ibm quantum experience to access the notes or use jupyter in anaconda?
Avatar
Anonymous 20-Jul-20 08:12 AM
it's easier you can install everything locally to o
Avatar
Anonymous 20-Jul-20 08:13 AM
The #lab-exercises, #discussion-reference and #find-study-group is only accessible to the people lab-role right?
Avatar
Anonymous 20-Jul-20 08:14 AM
@Anonymous i dont think so
Avatar
Anonymous 20-Jul-20 08:16 AM
@Anonymous it is so. I just saw that (edited)
Avatar
Anonymous 20-Jul-20 08:17 AM
It is. Only lab students can access the channels under LABS
Avatar
Anonymous 20-Jul-20 08:21 AM
do we have to use ibm quantum experience to access the notes or use jupyter in anaconda?
@Anonymous You can use either but using IBM quantum experience ensures that you have all dependencies on hand (edited)
Avatar
Anonymous 20-Jul-20 08:22 AM
Are most of you using IBMQ experience?
Avatar
Anonymous 20-Jul-20 08:22 AM
@Anonymous it is so. I just saw that
@Anonymous ok
Avatar
Anonymous 20-Jul-20 08:28 AM
Are most of you using IBMQ experience?
@Anonymous Yes
Avatar
Anonymous 20-Jul-20 08:28 AM
Thanks
Avatar
Anonymous 20-Jul-20 08:42 AM
do we have a github organization where we could be invited?
Avatar
Anonymous 20-Jul-20 08:46 AM
How would I confirm wether I am in the lab?
Avatar
Anonymous 20-Jul-20 08:47 AM
@Anonymous Aziz You are in lab
Click on your name you'll get to see your role
Avatar
Anonymous 20-Jul-20 08:47 AM
Ok thanka
Thanks*
Avatar
Anonymous 20-Jul-20 08:48 AM
If you can see an talk in this channel you are part of the lab students
🎊 1
Avatar
Anonymous 20-Jul-20 08:51 AM
Hello
Avatar
Anonymous 20-Jul-20 08:53 AM
how to access lab?
Avatar
Anonymous 20-Jul-20 08:53 AM
@Anonymous Aziz your name must show in red colour when you message.....or click on your icon
Avatar
Anonymous 20-Jul-20 08:54 AM
hi
Avatar
Anonymous 20-Jul-20 08:57 AM
Hi
Avatar
Anonymous 20-Jul-20 08:58 AM
Are labs recorded too?
Avatar
Anonymous 20-Jul-20 08:59 AM
Test
Avatar
Anonymous 20-Jul-20 08:59 AM
How do i know if i have access to the labs?
Avatar
Anonymous 20-Jul-20 09:01 AM
hi
Avatar
Anonymous 20-Jul-20 09:04 AM
as far as I know if you are in this channel it means you don't have to worry about anything regarding the labs, should be sent to you automatically
Avatar
Anonymous 20-Jul-20 09:05 AM
hello please when do we start ?
Avatar
Anonymous 20-Jul-20 09:08 AM
We are good to go
In secs
Avatar
Anonymous 20-Jul-20 09:12 AM
@Anonymous Will the Lab sessions be recorded ? It is not specified in the email or Discord instructions Its only said that they will post the solutions
Avatar
Anonymous 20-Jul-20 09:12 AM
Checking role
Avatar
Anonymous 20-Jul-20 09:13 AM
@Anonymous Farooqui yes everything will be available, don't worry and enjoy the lecture.
👍 1
Avatar
Anonymous 20-Jul-20 09:14 AM
I am unable to join the lecture
Avatar
Anonymous 20-Jul-20 09:17 AM
How can I get into labs later?
Avatar
Anonymous 20-Jul-20 09:18 AM
@Anonymous lets wait they will send the link
Avatar
Anonymous 20-Jul-20 09:18 AM
test
Avatar
Anonymous 20-Jul-20 09:19 AM
@Anonymous Thanks mate !!! I guess they will send us mail later
this 1
Avatar
Anonymous 20-Jul-20 09:21 AM
Hello Everyone, Check #lectures .
For instructions on joining lectures.
Avatar
Anonymous BOT 20-Jul-20 09:32 AM
Day 1 Lecture https://www.crowdcast.io/e/qgss-day1 Password: qiskitday1
Register now for Qiskit Events's event on Crowdcast, scheduled to go live on Monday July 20, 2020 at 9:00 am EDT.
Your hand has been raised! A mentor will drop in as soon as they are available.
Avatar
Anonymous 20-Jul-20 09:48 AM
anyone else finding the notation confusing? (edited)
Avatar
Anonymous 20-Jul-20 09:50 AM
^big yes
Avatar
Anonymous 20-Jul-20 09:53 AM
anyone able to explain xD
Avatar
Anonymous 20-Jul-20 09:53 AM
Looks like physics. My friend talks and explains like this and it always looses me
Avatar
Anonymous 20-Jul-20 09:53 AM
if you no physics major, hell ya, if physics major, not really
which part not make sense?
Avatar
Anonymous 20-Jul-20 09:54 AM
well tbh, I'm on PST. I was kinda hoping I could start now with the first hour recorded, but the entire lecture is only aval after the lecture. So i have no idea what the first hour is
Avatar
Anonymous 20-Jul-20 09:55 AM
sry, did not read entire reply at first (edited)
Avatar
Anonymous 20-Jul-20 10:03 AM
anyone else finding the notation confusing?
@Anonymous It is really intuitive once you get into it, but probably this introduction is too fast for people who never seen it. If you have any question i can try to help.
Looks like physics. My friend talks and explains like this and it always looses me
@Anonymous yes, that's exacly what you learn in any basic quantum mechanics courses
Avatar
Anonymous 20-Jul-20 10:06 AM
It's based on quantum mechanics so people without that background might find it confusing. It might not be easy to get used to in one lecutre. (edited)
Avatar
Anonymous 20-Jul-20 10:08 AM
Just in case, if you have problems in understanding this. You can take help from Qiskit Textbook.
Avatar
Anonymous 20-Jul-20 10:10 AM
My recommendation is for everyone who's finding this hard due to not having the minimum basics to hit this resource before tomorrow: https://qiskit.org/textbook/preface.html at the very least the 0. Prerequisites and 1.1 Introduction areas
A university quantum algorithms/computation course supplement based on Qiskit
👍 5
Avatar
Anonymous 20-Jul-20 10:16 AM
well, happy to know i'm not alone in my trouble (edited)
Avatar
Anonymous BOT 20-Jul-20 10:17 AM
A university quantum algorithms/computation course supplement based on Qiskit
We give you an introduction to probability through the example of flipping a quarter and rolling a die.
Sal explains what it means to multiply two matrices, and gives an example.
👍 1
Avatar
Anonymous 20-Jul-20 10:21 AM
If anyone is looking for resources to learn linear algebra, I really like 3blue1brown's video series: https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab. It provides an intuitive understanding, beyond equations and formulae
Enjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube.
👍 2
Avatar
Anonymous 20-Jul-20 10:21 AM
thanks for sharing
Avatar
Anonymous 20-Jul-20 10:22 AM
3blue1brown's great but I think for QM, you need to do some problems too...I recommend Linear Algebra and Matrix Theory by Gilbert and Gilbert
the chapters are short and it covers linear operators very well
Avatar
Anonymous 20-Jul-20 10:23 AM
the 3blue1brown resource is very intuitive - it's really great
Avatar
Anonymous 20-Jul-20 10:23 AM
Can someone explain what is Normalisation?
Avatar
Anonymous 20-Jul-20 10:24 AM
making something unit 1
Avatar
Anonymous 20-Jul-20 10:24 AM
it's a mathematical tool to ensure the total proability of finding a particle is equal to 1
since you're dealing with probabilities, you have to ensure the probabilities add up to 1 otherwise the wavefunctions won't represent physically observable events or objects
Avatar
Anonymous 20-Jul-20 10:25 AM
Remember that a superposition state looks like a|0> + b|1> where a^2 + b^2 = 1. Normalization ensures that this property, that the coefficients squared sum to 1. This makes sense because the probability of measuring this qubit in state |0> is a^2, and the probability of measuring this qubit in state |1> is b^2. These probabilities must add up to 1, because you can't possibly measure it in anything else if the only two possible basis states are |0> and |1>.
Avatar
Anonymous 20-Jul-20 10:26 AM
so normalization isn't just something nice to have...it's an essential property
👍 1
Avatar
Anonymous 20-Jul-20 10:33 AM
Can someone explain what is Normalisation?
@Anonymous basically a normalized vector is a vector with lenght 1. The lenght of a vector is the sum of his squared components (squared modulus if the components are complex numbers). You get this by making the dot product of the vector whit itself, <v|v> in Dirac's notation. So a state vector |v> is normalized if <v|v>=1 . Usually is called normalization the factor you have to multiply a vector to normalize it. Hope this help!
👍 3
Avatar
Anonymous 20-Jul-20 10:39 AM
so normalization isn't just something nice to have...it's an essential property
@Anonymous it’s a necessity at the same time it’s nice to have it 🙊
👍 1
Avatar
Anonymous 20-Jul-20 10:44 AM
What is intrinsically special about the Pauli matrices? Why not some other gates?
Avatar
Anonymous 20-Jul-20 10:45 AM
they have trace 0, determinant 1 and square to identity matrix, so pretty nice to work with
🤔 1
💯 1
generally, Pauli matrices come from describing the spin of particles (spinors).
Avatar
Anonymous 20-Jul-20 10:59 AM
What is intrinsically special about the Pauli matrices? Why not some other gates?
@Anonymous they also are a basis for describing any proper "rotations" in C^2, the vector space qubits live in. The transformation group being SU(2). These are unitary and have determinant +1.
👍 4
Avatar
Anonymous 20-Jul-20 11:20 AM
Someone knows where I could find information about S matrix
That matrix is not unitary, right?
Avatar
Anonymous 20-Jul-20 11:21 AM
A university quantum algorithms/computation course supplement based on Qiskit
It is an unitary gate
Avatar
Anonymous 20-Jul-20 11:30 AM
@Anonymous Schmitt , got it, thank you so much
Avatar
Anonymous 20-Jul-20 11:31 AM
That matrix is not unitary, right?
@Anonymous Duran if it's a gate operation then it MUST be unitary. because quantum computation is reversible which means you can go back and forth as you wish and trace back to your original starting point, unlike classical computing.
💯 1
Avatar
Anonymous 20-Jul-20 11:36 AM
@Anonymous Asfaw mentioned in a comment about downloading zip files to set up locally for the lab session. But I'd like to know if the online IBM QX will be good enough for the labs since my PC has a problem with installing Qiskit.
Avatar
Anonymous 20-Jul-20 11:37 AM
the zip files contain dependencies that you will need to upload one by one into the IBM Quantum Experience. We have not tested for this, and encourage you to use a local installation.
for those of you having trouble installing qiskit, I'd strongly recommend using environments and starting a fresh qiskit install
see here for how to do this:
👍 1
Avatar
Anonymous 20-Jul-20 11:46 AM
Will the lab session depend on our understanding of the lecture?
Avatar
Anonymous 20-Jul-20 12:07 PM
where will the link for the lab be given?
Avatar
Anonymous 20-Jul-20 12:09 PM
They said that an email will be sent out around 1 pm EST
Avatar
Anonymous 20-Jul-20 12:16 PM
They said that an email will be sent out around 1 pm EST
@Anonymous ok thnx
😀 1
Avatar
Anonymous 20-Jul-20 12:17 PM
@Anonymous Asfaw Thanks . IT is installed on using acaconda package.
Avatar
Anonymous 20-Jul-20 12:17 PM
hi.. has everyone here received a lab confirmation email?
Avatar
Anonymous 20-Jul-20 12:17 PM
No, I hasn't (edited)
Avatar
Anonymous 20-Jul-20 12:18 PM
hi.. has everyone here received a lab confirmation email?
@Anonymous Elmeligy No, have you?
Avatar
Anonymous 20-Jul-20 12:20 PM
@Anonymous Asfaw mentioned in a comment about downloading zip files to set up locally for the lab session. But I'd like to know if the online IBM QX will be good enough for the labs since my PC has a problem with installing Qiskit.
@Anonymous what is this zipfile everyone is talking about 😐
Avatar
Anonymous 20-Jul-20 12:21 PM
@Anonymous @Anonymous No .. but my friend did two days ago 😦
Avatar
Anonymous BOT 20-Jul-20 12:23 PM
Daily Schedule Times Presented in EDT (UTC -04) 8:30 AM : Daily Update Posted in Discord & Emailed - including Lecture Link & Password 9:00 AM : Lecture Begins via Crowdcast 12:00 PM : Lecture Ends via Crowdcast 12:30 PM : Lecture Notes & Recording Link Posted in Discord   1:00 PM : Lab Session Access Link & Notebook Posted in Discord 1:30 PM : Previous Day Lab Work Solution Posted in Discord
Avatar
Anonymous 20-Jul-20 12:23 PM
@Anonymous what is this zipfile everyone is talking about 😐
@Anonymous Govintharajah they would specify it in the lab session I suppose.
Avatar
Anonymous 20-Jul-20 12:24 PM
It's probably optimum to install the qiskit packages in a conda environment
👍 2
Avatar
Anonymous 20-Jul-20 12:24 PM
will the link to the lab session sent out via mail?
Avatar
Anonymous 20-Jul-20 12:24 PM
!labrole Mausam Bindhani
Avatar
Anonymous 20-Jul-20 12:24 PM
!labrole khaleel pasha
Avatar
Anonymous 20-Jul-20 12:27 PM
Online environment on IBM website also works right?
Avatar
Anonymous 20-Jul-20 12:27 PM
why are you applying for lab youre already in a lab only channel
Avatar
Anonymous 20-Jul-20 12:27 PM
..
Avatar
Anonymous 20-Jul-20 12:27 PM
As the lab sessions are recorded can they be watched anytime or only in the time slot given?
Avatar
Anonymous 20-Jul-20 12:28 PM
Im a bit confused of what labrole is? If your name is in red this means we are already good to go right?
Avatar
Anonymous 20-Jul-20 12:29 PM
Where are the lab sessions?
👍 1
Avatar
Anonymous 20-Jul-20 12:29 PM
yes
Avatar
Anonymous 20-Jul-20 12:29 PM
@Anonymous Yeah, is lab live too?
Avatar
Anonymous 20-Jul-20 12:29 PM
Im a bit confused of what labrole is? If your name is in red this means we are already good to go right?
@Anonymous yes that is what it means
Avatar
Anonymous 20-Jul-20 12:29 PM
and hwere is it?>
Avatar
Anonymous 20-Jul-20 12:29 PM
...
Avatar
Anonymous 20-Jul-20 12:29 PM
What is going on with labs?
Avatar
Anonymous 20-Jul-20 12:29 PM
hi
Avatar
Anonymous 20-Jul-20 12:29 PM
Where is the lab session and link to notebooks?
Avatar
Anonymous 20-Jul-20 12:29 PM
1:00 PM : Lab Session Access Link Is the lab session also a live stream?
Avatar
Anonymous 20-Jul-20 12:29 PM
labs start at 1, (half an hour from now) the instructions channel will have information by then i think
Avatar
Anonymous 20-Jul-20 12:29 PM
lab access link?
Avatar
Anonymous 20-Jul-20 12:30 PM
can we see the recording for lab sessions?
Avatar
Anonymous 20-Jul-20 12:30 PM
I hope it will be uploaded by then my assumption is yes
but the lecture ran late so idk what the upload schedule will be
Avatar
Anonymous 20-Jul-20 12:31 PM
I think we'll get updates on the instruction channel in a while.
Avatar
Anonymous 20-Jul-20 12:31 PM
Avatar
Anonymous 20-Jul-20 12:32 PM
?
Avatar
Anonymous 20-Jul-20 12:32 PM
Whenz the lab gonna start?
Anyone?m
Avatar
Anonymous 20-Jul-20 12:32 PM
1
this information is available in the attendee guide
Avatar
Anonymous 20-Jul-20 12:33 PM
Thank you
Avatar
Anonymous 20-Jul-20 12:35 PM
In which discord channel will the lecture notes be posted? I haven't seen the link for lecture note yet.
Avatar
Anonymous 20-Jul-20 12:36 PM
Is there something we were supposed to download? If I have qiskit installed is that enough?
Avatar
Anonymous 20-Jul-20 12:36 PM
@Anonymous yea
Avatar
Anonymous 20-Jul-20 12:38 PM
@Anonymous As in its enough
?
Avatar
Anonymous 20-Jul-20 12:38 PM
If I can write here, does that mean I'm in the labs, doesn't it?
Avatar
Anonymous 20-Jul-20 12:38 PM
Yeah that might be enough. The IBMQ site has its own jupyter notebook embedded.
So you can work locally or online
@Anonymous click on your name, and you should have the labstudents tag (edited)
Avatar
Anonymous 20-Jul-20 12:39 PM
I see it
This is my first time using discord, so I'm really lost
xD
Where is the link for the lab session?
Avatar
Anonymous 20-Jul-20 12:40 PM
Prueba
Avatar
Anonymous 20-Jul-20 12:41 PM
1:00 PM : Lab Session Access Link & Notebook Posted in Discord
Avatar
Anonymous 20-Jul-20 12:41 PM
Prueba
@Anonymous En qué parte?
Avatar
Anonymous 20-Jul-20 12:41 PM
e.e
Avatar
Anonymous 20-Jul-20 12:41 PM
1:00 PM : Lab Session Access Link & Notebook Posted in Discord
@Anonymous Got it. There's still time
Avatar
Anonymous 20-Jul-20 12:41 PM
@Anonymous En qué parte?
@Anonymous era una prueba para ver mi nombre jajaja
Avatar
Anonymous 20-Jul-20 12:41 PM
@Anonymous era una prueba para ver mi nombre jajaja
@Anonymous Jajajajajaja, vale
Avatar
Anonymous 20-Jul-20 12:42 PM
@Anonymous so where i can find the link?.
Avatar
Anonymous 20-Jul-20 12:43 PM
It should come here right
Avatar
Anonymous 20-Jul-20 12:43 PM
Did anyone received the link for lab?
Avatar
Anonymous 20-Jul-20 12:43 PM
@Anonymous which place in Discord can we find the link & Notebook posted ?
Avatar
Anonymous 20-Jul-20 12:43 PM
maybe instructions?
Avatar
Anonymous 20-Jul-20 12:43 PM
Did anyone recieve invitation link?
Avatar
Anonymous 20-Jul-20 12:43 PM
What is the lab only channel?
Avatar
Anonymous 20-Jul-20 12:43 PM
I think it'll be pinned somewhere in the LABS channel.
Or they'll email it
Avatar
Anonymous 20-Jul-20 12:44 PM
oh never mind, this is it, lmao
Avatar
Anonymous 20-Jul-20 12:45 PM
Did anyone received the link for lab?
@Anonymous Bhole Nope...
👍 1
Avatar
Anonymous 20-Jul-20 12:47 PM
Guys it says 1pm. There's yet 13 mins to that specified time
Avatar
Anonymous 20-Jul-20 12:47 PM
noone recieved it
Avatar
Anonymous 20-Jul-20 12:47 PM
Where the link is posted. The discord is a huge place, would be helpful if you could specify where to look for it. thanks in advance
Avatar
Anonymous 20-Jul-20 12:48 PM
@Anonymous Bhole > @Anonymous which place in Discord can we find the link & Notebook posted ? @Anonymous HAQ SHAIK You have to create you own environment in attendee guide they've mentioned
Avatar
Anonymous 20-Jul-20 12:48 PM
i guess it would be posted in instructions
👍 1
Avatar
Anonymous 20-Jul-20 12:48 PM
It'll be posted in a channel under labs - probably #lab-exercises but it will be posted on the time specified
👍 3
Avatar
Anonymous 20-Jul-20 12:48 PM
people just relax everything will be available in due time
🍉 5
👍 8
💯 5
Avatar
Anonymous 20-Jul-20 12:50 PM
people just relax everything will be available in due time
@Anonymous Yeah man, like just chill 🤣
Avatar
Anonymous 20-Jul-20 12:50 PM
And the notes will also probably be posted in #lab-exercises
Avatar
Anonymous 20-Jul-20 12:50 PM
Will the labs be live too or recorded?
Avatar
Anonymous 20-Jul-20 12:51 PM
Yes
both
Avatar
Anonymous 20-Jul-20 12:51 PM
help during the labs if possible
Avatar
Anonymous 20-Jul-20 12:51 PM
good sign bois
👍 1
Avatar
Anonymous 20-Jul-20 12:52 PM
Does anyone know how to attend the lab?
Avatar
Anonymous 20-Jul-20 12:52 PM
Haha
Avatar
Anonymous 20-Jul-20 12:52 PM
Same question about attending the lab
Avatar
Anonymous 20-Jul-20 12:52 PM
Okay! Nevermind@Anonymous
Avatar
Anonymous 20-Jul-20 12:52 PM
Avatar
Anonymous 20-Jul-20 12:53 PM
which channel will have lecture link?
👍 2
Avatar
Anonymous 20-Jul-20 12:54 PM
Thanks @Anonymous
Avatar
Anonymous 20-Jul-20 12:55 PM
Lab Link?
Avatar
Anonymous 20-Jul-20 12:56 PM
check the #lab-exercises channel under labs
👍 2
Avatar
Anonymous 20-Jul-20 12:56 PM
@Anonymous check #lectures pinned messages for video links and other notes
Avatar
Anonymous 20-Jul-20 01:01 PM
have the labs started?
Avatar
Anonymous 20-Jul-20 01:01 PM
5 minutes
Avatar
Anonymous 20-Jul-20 01:01 PM
what does ";group casual" do? :"D
Avatar
Anonymous 20-Jul-20 01:02 PM
I am a lab student but I haven't received any info about the labs
Avatar
Anonymous 20-Jul-20 01:02 PM
@Anonymous Elmeligy it should let you join a random study group, idk if it still works tho haha
Avatar
Anonymous 20-Jul-20 01:02 PM
wait for 5 minutes more
Avatar
Anonymous 20-Jul-20 01:02 PM
legit nothing @Anonymous Elmeligy
Avatar
Anonymous 20-Jul-20 01:02 PM
#lab-exercises channel
Avatar
Anonymous 20-Jul-20 01:02 PM
Hey @Anonymous check the Labs>#lab-exercises channel
Avatar
Anonymous 20-Jul-20 01:02 PM
dont know why people spam
Avatar
Anonymous 20-Jul-20 01:02 PM
They haven't posted it yet but it will be there
Avatar
Anonymous 20-Jul-20 01:02 PM
?help
Avatar
Anonymous 20-Jul-20 01:03 PM
@Anonymous Elmeligy it should let you join a random study group, idk if it still works tho haha
@Anonymous Thank you :"
Avatar
Anonymous 20-Jul-20 01:03 PM
I don't see any info on the #lab-exercises channel though
Avatar
Anonymous 20-Jul-20 01:04 PM
wait for the instructions guys, please be patient.
👍 8
Avatar
Anonymous 20-Jul-20 01:04 PM
for all quantum gates and systems, are they represented in an N x N matrix?
Avatar
Anonymous 20-Jul-20 01:05 PM
I don't see any info on the #lab-exercises channel though
@Anonymous he[mentor] asked to wait right?
👍 2
Avatar
Anonymous 20-Jul-20 01:05 PM
qiskitwhite
qiskitsmart 6
QiskitMulti 4
qiskitwhite 4
U1_gate 2
U2_gate 2
U3 3
Measure 2
Avatar
Anonymous 20-Jul-20 01:05 PM
Ok guys! keep calm and wait. The number of people registered is 10x what the team was targeting.
👍 4
🤪 1
Avatar
Anonymous 20-Jul-20 01:06 PM
for all quantum gates and systems, are they represented in an N x N matrix?
@Anonymous Lam i think so, i never encountered for non-square matrix. i think from tensor product it just tells us that the operator must be square matrix
Avatar
Anonymous 20-Jul-20 01:06 PM
for all quantum gates and systems, are they represented in an N x N matrix?
@Anonymous Lam Yes, all the gates can be represented as N x N matrices. Since they have to act on 1 x N or N x 1 states.
Avatar
Anonymous 20-Jul-20 01:06 PM
Lab link not posted yet, right?
Avatar
Anonymous 20-Jul-20 01:07 PM
nope @Anonymous
Avatar
Anonymous 20-Jul-20 01:09 PM
Lab link not posted yet, right?
@Anonymous posted
in #lab-exercises
Avatar
Anonymous 20-Jul-20 01:10 PM
lab link?
Avatar
Anonymous 20-Jul-20 01:10 PM
yup
Avatar
Anonymous 20-Jul-20 01:10 PM
Can we use jupyter lab?
Avatar
Anonymous 20-Jul-20 01:10 PM
u shud
wait
lab?
notebook right?
Avatar
Anonymous 20-Jul-20 01:11 PM
Can we use jupyter lab?
@Anonymous juputer notebook is better... lab may give u some issues
👍 1
Avatar
Anonymous 20-Jul-20 01:11 PM
jupyter lab not notebook
Avatar
Anonymous 20-Jul-20 01:11 PM
@Anonymous
jupyter lab not notebook
@Anonymous what's that?
Avatar
Anonymous 20-Jul-20 01:11 PM
The newer jupyter interface @Anonymous
Avatar
Anonymous 20-Jul-20 01:12 PM
When will we get the lecture notes?
Avatar
Anonymous 20-Jul-20 01:13 PM
Can we access the lab videos for the full duration of the course?
Avatar
Anonymous 20-Jul-20 01:13 PM
Can we access the lab videos for the full duration of the course?
@Anonymous presumably yes
The newer jupyter interface @Anonymous
@Anonymous not aware
Avatar
Anonymous 20-Jul-20 01:13 PM
how/when do we submit our labs? i vaguely remember that theyre all due the 31st but i want to double check
Avatar
Anonymous 20-Jul-20 01:13 PM
One question about the .ipynb - when the first cell does a pip install does that permanently update the conda environment I have or does it just work in a temp environment inside of jupyter notebook?
Avatar
Anonymous 20-Jul-20 01:14 PM
@Anonymous yes that's right
Avatar
Anonymous 20-Jul-20 01:15 PM
I don't really get how we should submit this
Avatar
Anonymous 20-Jul-20 01:15 PM
Please send me the lab link in this email thakur.kkphy@Anonymous I am am waiting for the lab section, quite confused
Avatar
Anonymous 20-Jul-20 01:15 PM
@Anonymous kishore - look in #lab-exercises
Avatar
Anonymous 20-Jul-20 01:15 PM
By when do we need to submit the labs notebooks? Also, the Lab video was only 10m long. Is that it or do I have the wrong link?
Avatar
Anonymous 20-Jul-20 01:16 PM
For the video, that's it
Avatar
Anonymous 20-Jul-20 01:16 PM
by the end of the summer school
Avatar
Anonymous 20-Jul-20 01:16 PM
labs are due by the end of the summer school
Avatar
Anonymous 20-Jul-20 01:16 PM
But the solutions get posted every day as per the schedule no?
Avatar
Anonymous 20-Jul-20 01:16 PM
So I can submit the lab book after 12h right? Cos it is late and I need to sleep
Avatar
Anonymous 20-Jul-20 01:17 PM
I think they are due tomorrow
Avatar
Anonymous 20-Jul-20 01:17 PM
But the solutions get posted every day as per the schedule no?
@Anonymous Really?
@Anonymous Can y'all please clarify the Lab deadlines?
Avatar
Anonymous 20-Jul-20 01:17 PM
1:30 PM : Previous Day Lab Work Solution Posted in Discord
Avatar
Anonymous 20-Jul-20 01:17 PM
they aren't due till the end of the summer school, and yes we get the day before's solutions everyday
Avatar
Anonymous 20-Jul-20 01:18 PM
Makes no sense if we get the solutions
👍 1
Avatar
Anonymous 20-Jul-20 01:18 PM
so we can do the labs anytime then ??
is there a time for submition
Avatar
Anonymous 20-Jul-20 01:18 PM
Yes. before the end of the ssummer school
Avatar
Anonymous 20-Jul-20 01:18 PM
they are due tomorrow before solutions are distributed
Avatar
Anonymous 20-Jul-20 01:18 PM
it's not meant to be a test, the solutions help us improve the work we are doing
Avatar
Anonymous 20-Jul-20 01:18 PM
It is meant to be interactive and to help you better grasp the concepts
Avatar
Anonymous 20-Jul-20 01:18 PM
Do we have a timeline to finish this lab activity?
Avatar
Anonymous 20-Jul-20 01:18 PM
We want to encourage you to learn as much as possible, so we are allowing submissions until the end of the summer school. However, we will be posting the solutions 24h after the labs are posted.
👍 12
qiskitwhite 1
Avatar
Anonymous 20-Jul-20 01:18 PM
I agree, but there is a grading system for the certificates
it's not meant to be a test, the solutions help us improve the work we are doing
@Anonymous
👍 1
Avatar
Anonymous 20-Jul-20 01:19 PM
I agree, but there is a grading system for the certificates @Anonymous
@Anonymous I feel like that's more to ensure you have actually been improving and learning
Avatar
Anonymous 20-Jul-20 01:19 PM
Does any one started Lab? I mean how to start it? Can someone explain the steps clearly?
Avatar
Anonymous 20-Jul-20 01:19 PM
Gotcha.. So does that mean .. even if we submit the lab after 24 hours or after the lab solutions have been shared.. they would be graded?
Avatar
Anonymous 20-Jul-20 01:19 PM
when's the lab deadline?
Avatar
Anonymous 20-Jul-20 01:19 PM
it appears for the lab you simply go through the video recording and then solve the problems
Avatar
Anonymous 20-Jul-20 01:20 PM
@Anonymous Asfaw listening to the instructions.... if I was to run these files on the IBM Q server, do I need to import all the supporting docs or just the .ipynb notebook file?
Avatar
Anonymous 20-Jul-20 01:20 PM
Gotcha.. So does that mean .. even if we submit the lab after 24 hours or after the lab solutions have been shared.. they would be graded?
@Anonymous We can submit till 31st of July. 23:59 hrs EDT. And we can resubmit as well.
Avatar
Anonymous 20-Jul-20 01:20 PM
I will start the lab tomorrow, my timezone alrdy midnight 🙂
Avatar
Anonymous 20-Jul-20 01:20 PM
I think the guide was confusing cuz it says the lab is due on the 31st which doesn't make sense
Avatar
Anonymous 20-Jul-20 01:20 PM
Gotcha.. So does that mean .. even if we submit the lab after 24 hours or after the lab solutions have been shared.. they would be graded?
@Anonymous Yes, however if you want the challenge and the excitement of solving it with the community before solutions (in my opinion a great way to learn), then do submit within 24 hours and see if you get the right answer. Then you can try again later if you missed something after rewatching the lectures
👍 10
qiskitsmart 5
💯 2
Avatar
Anonymous 20-Jul-20 01:20 PM
How can we do the labs without installing qiskit ?
Avatar
Anonymous 20-Jul-20 01:21 PM
@Anonymous K. use Jupyter to install qiskit
Avatar
Anonymous 20-Jul-20 01:21 PM
Is it possible to run the labs online on Qiskit Notebooks, instead of running it on our local systems if so, do we import the two auxillary folders onto the cloud as well?
👍 1
Avatar
Anonymous 20-Jul-20 01:21 PM
Program real quantum systems with the leading quantum cloud application.
Avatar
Anonymous 20-Jul-20 01:21 PM
@Anonymous K. I guess you can use IBM Q X
Avatar
Anonymous 20-Jul-20 01:21 PM
!pip install qiskit
Avatar
Anonymous 20-Jul-20 01:21 PM
I have restrictions in my laptop.. can i use Google colab
Avatar
Anonymous 20-Jul-20 01:21 PM
Upload notebooks there
Avatar
Anonymous 20-Jul-20 01:21 PM
Google colab is fine too
Avatar
Anonymous 20-Jul-20 01:22 PM
Yes exactly
Avatar
Anonymous 20-Jul-20 01:22 PM
@Anonymous Asfaw So submissions any time before the 31st will be graded equally?
Avatar
Anonymous 20-Jul-20 01:22 PM
Looks like typo here
👍 1
Avatar
Anonymous 20-Jul-20 01:22 PM
how to know my group?
👍 1
Avatar
Anonymous 20-Jul-20 01:22 PM
@Anonymous nope that's a function in qiskit.visualizations
Avatar
Anonymous 20-Jul-20 01:22 PM
This has been mentioned in the FAQs and several places before, but I will repeat it once more. The lab files come with dependencies in the zip file that are contained in the folders that you have extracted. You need those dependencies to run the lab. We strongly recommend using your computer to do this by installing Qiskit. Uploading the dependencies to the IBM Quantum Experience is not trivial, and we do not recommend that route. [the same holds for any other online service] (edited)
👍 11
qiskitsmart 1
Avatar
Anonymous 20-Jul-20 01:23 PM
@Anonymous create your own group.
Avatar
Anonymous 20-Jul-20 01:23 PM
Is running the final cell correctly the submission of the assignment? Or do we have to submit the notebook elsewhere?
Avatar
Anonymous 20-Jul-20 01:23 PM
Hi @Anonymous Asfaw can we resubmit the answers, if we are not able to solve first time?
Avatar
Anonymous 20-Jul-20 01:24 PM
@Anonymous Asfaw if we have restrictions not to install any software, what could be the best option to do labs? (edited)
Avatar
Anonymous 20-Jul-20 01:24 PM
@Anonymous Running the final cell with your email and Full name should do
Avatar
Anonymous 20-Jul-20 01:24 PM
Hi @Anonymous Asfaw can we resubmit the answers, if we are not able to solve first time?
@Anonymous Tripathy This is also mentioned in the FAQs and several places before, but yes -- you can try submitting multiple times.
Avatar
Anonymous 20-Jul-20 01:25 PM
I am getting the following error while running the code
ImportError: cannot import name 'random_quantum_channel' from 'qiskit.quantum_info.random'
Avatar
Anonymous 20-Jul-20 01:26 PM
hey where will i find the lecture notes? i can find the video only
👍 1
Avatar
Anonymous 20-Jul-20 01:27 PM
Yes please can we get the lecture notes?
Avatar
Anonymous BOT 20-Jul-20 01:27 PM
Frequently Asked Questions What is the difference between the orange names and yellow names?  Name colors represent roles that various people have. All students are yellow, and orange names are students participating in both the labs and lectures. (NOTE: It may take around 45 minutes for your role to be updated - please give admins some time to update). How do I know if I am in the labs? - You received an email confirmation saying you were in the labs - (Optional) You confirmed lab participation with a checkbox form sent in the confirmation - You received your invitation to join Discord on July 18 EDT - Your name is already in orange and has the “labstudent” role assigned (confirmable in the chat window to the right) Will the lectures be recorded? What about the labs?  Yes! You can join live, or watch the content on-demand. Links will be posted daily in Discord.  Will Lab materials be available if I am not a Lab student? Lecture students will have access to lecture presentations (live and recording), lecture notes, and discussions. There will be Q&A available both in Discord and Crowdcast. Students also registered for labs (which are made up of the first 2k people who registered for the summer school) will also have access to lab work and associated content. Lab materials and content will only be accessible by lab students. Do i need to download anything to participate?  Nope! Everything can be done in-browser.  Tip for all! Manage your notifications - you can right click on the server as a whole or individual categories and channels - and set your notification from "All messages" to "Only @ mentions". It will help a lot! Don't forget to check out the Attendee Guide - it has answers to some of the questions that haven't even been thought of yet!
Avatar
Anonymous 20-Jul-20 01:27 PM
u can find it in the LABS section#instruction
Avatar
Anonymous 20-Jul-20 01:28 PM
none of the images (not including the images of the circuits themselves) are loading for me and also resources module does not work is that not part of qiskit as i do have qiskit installaed
Avatar
Anonymous 20-Jul-20 01:29 PM
none of the images (not including the images of the circuits themselves) are loading for me and also resources module does not work is that not part of qiskit as i do have qiskit installaed
@Anonymous were you able to run the first cell in the notebook?
Avatar
Anonymous 20-Jul-20 01:29 PM
Same for me
none of the images (not including the images of the circuits themselves) are loading for me and also resources module does not work is that not part of qiskit as i do have qiskit installaed
@Anonymous
Avatar
Anonymous 20-Jul-20 01:30 PM
@Anonymous V yes i am able to run all the cells so far i jsut hope that this does not effect the final submission (havent tried that yet)
Avatar
Anonymous 20-Jul-20 01:30 PM
guys, where we'll submit our final codes?
Avatar
Anonymous 20-Jul-20 01:30 PM
I believe you can submit multiple times, so it shouldn't matter.
Avatar
Anonymous 20-Jul-20 01:31 PM
I have some restrictions on installations. Is it possible to provide a guide to solve the labs on IBM Q Experience ?
Avatar
Anonymous 20-Jul-20 01:31 PM
did anyone installl it on the local machine?
Avatar
Anonymous 20-Jul-20 01:31 PM
did anyone installl it on the local machine?
@Anonymous Yep
Avatar
Anonymous 20-Jul-20 01:31 PM
I'm downloading Anaconda Python right now... #drumsfingers
Avatar
Anonymous 20-Jul-20 01:32 PM
It is just a regular python installation inside an environment
Avatar
Anonymous 20-Jul-20 01:32 PM
Is this lab due tomorrow?
Avatar
Anonymous 20-Jul-20 01:32 PM
End of summer school
Avatar
Anonymous 20-Jul-20 01:32 PM
When's it due?
Avatar
Anonymous 20-Jul-20 01:32 PM
download anaconda...run python and install qiskit using the command !pip install qiskit
Avatar
Anonymous 20-Jul-20 01:32 PM
Oh okay
Avatar
Anonymous 20-Jul-20 01:32 PM
I cant get things to run in the jupyter notebook, it looks like the kernel keeps restarting? terminal says "Current working directory doesn't exist."
Avatar
Anonymous 20-Jul-20 01:33 PM
Also, does anyone know where to get the lecture notes?
Avatar
Anonymous 20-Jul-20 01:33 PM
Avatar
Anonymous 20-Jul-20 01:33 PM
then type: import qiskit in the jupyter notebook
Avatar
Anonymous 20-Jul-20 01:33 PM
Untill what date can we submit the first lab?
Avatar
Anonymous 20-Jul-20 01:34 PM
Answers to labs appear around this time the next day, but all submissions are due July 31st if I remember correctly.
Avatar
Anonymous 20-Jul-20 01:34 PM
that kind of doesn't make sense though
anyways...let's do the lab and submit it
Avatar
Anonymous 20-Jul-20 01:35 PM
that kind of doesn't make sense though
@Anonymous Yeah
Avatar
Anonymous 20-Jul-20 01:36 PM
Hello ppl, I guess I am kinda stuck with installing qiskit, i cannot open the lab 1 jupyter notebook
Avatar
Anonymous 20-Jul-20 01:36 PM
Is any one able to run the lines of the .pynb lab file in jupyter notebook? The inliner for me is not changing from * to 1
Avatar
Anonymous 20-Jul-20 01:37 PM
Hello ppl, I guess I am kinda stuck with installing qiskit, i cannot open the lab 1 jupyter notebook
@Anonymous Did you install Anaconda Navigator? And which OS are you using?
Avatar
Anonymous 20-Jul-20 01:37 PM
I had qiskit installed, but I seem to get this error ( The installation cell and the fiest cell after seem to execute correctly) (edited)
Avatar
Anonymous 20-Jul-20 01:37 PM
Out of all the codes we keep resubmitting for a lab,will the last submitted one be considered as the final submission?
Avatar
Anonymous 20-Jul-20 01:38 PM
@Anonymous pip install --upgrade qiskit
Avatar
Anonymous 20-Jul-20 01:38 PM
I had qiskit installed, but I seem to get this error
@Anonymous Did you download and install qiskit?
Avatar
Anonymous 20-Jul-20 01:39 PM
@Anonymous Yeah
@Anonymous I had this conversation in #deleted-channel only a short while ago
Avatar
Anonymous 20-Jul-20 01:39 PM
@Anonymous Did you install Anaconda Navigator? And which OS are you using?
@Anonymous I installed anaconda, I had followed the video tutorial. I could even just open a jupyter notebook based on how it shows in the video tutorial
Avatar
Anonymous 20-Jul-20 01:39 PM
I have opened ex1 using jupyter offered by my university. How or where do I submit the notebook then?
Avatar
Anonymous 20-Jul-20 01:39 PM
But now for the lab, i tried the way they said by dragging the file to the prompt but apparently the command doesnot work
Avatar
Anonymous 20-Jul-20 01:40 PM
@Anonymous it runs. Probably You make a Bad instalation of anaconda
Avatar
Anonymous 20-Jul-20 01:40 PM
Out of all the codes we keep resubmitting for a lab,will the last submitted one be considered as the final submission?
@Anonymous You should know the result of your submission before submitting - the .pdf file is the guideline of what you should see when correct/incorrect, so just make sure it is correct before submitting
Avatar
Anonymous 20-Jul-20 01:41 PM
I have opened ex1 using jupyter offered by my university. How or where do I submit the notebook then?
@Anonymous YOu can submit in their environemnt itself if they allow you to download qiskit and let you run the code in your local-machine but not in cloud
But now for the lab, i tried the way they said by dragging the file to the prompt but apparently the command doesnot work
@Anonymous Try this:
Avatar
Anonymous 20-Jul-20 01:41 PM
@Anonymous I had a similar issue, I opened Jupyter Notebook and then uploaded the file.
Avatar
Anonymous 20-Jul-20 01:41 PM
But now for the lab, i tried the way they said by dragging the file to the prompt but apparently the command doesnot work
@Anonymous jupyter notebook "path-to-your-file" Don't use the quotes
Avatar
Anonymous 20-Jul-20 01:42 PM
@Anonymous
this is what i am getting (edited)
Avatar
Anonymous 20-Jul-20 01:42 PM
@Anonymous I had a similar issue, I opened Jupyter Notebook and then uploaded the file.
@Anonymous You'll hvae to set the path to the notebook because there are grading-folders in the source directory
Avatar
Anonymous 20-Jul-20 01:42 PM
use quotes if your path has spaces
Avatar
Anonymous 20-Jul-20 01:42 PM
you should try import qiskit to see if everything work
Avatar
Anonymous 20-Jul-20 01:42 PM
it works for import qiskit but showing error for furthur cells
Avatar
Anonymous 20-Jul-20 01:42 PM
@Anonymous
@Anonymous There is no hiphen after jupyter. After notebook keyword, give a space
Avatar
Anonymous 20-Jul-20 01:43 PM
@Anonymous pip install --upgrade qiskit
@Anonymous Asfaw Thanks... that worked!... but I seem to still get some warnings in my first installation line, but so far..... good!
Avatar
Anonymous 20-Jul-20 01:43 PM
wait I am confused..
Avatar
Anonymous 20-Jul-20 01:43 PM
Avatar
Anonymous 20-Jul-20 01:43 PM
i confuse such things (edited)
Avatar
Anonymous 20-Jul-20 01:43 PM
But now for the lab, i tried the way they said by dragging the file to the prompt but apparently the command doesnot work
@Anonymous Try the same after activating the virtual environment in anaconda prompt.
Avatar
Anonymous 20-Jul-20 01:43 PM
When and where do we have to submit day 1 labwork?
Avatar
Anonymous 20-Jul-20 01:43 PM
@Anonymous same error
Avatar
Anonymous 20-Jul-20 01:43 PM
@Anonymous Did you download and install qiskit?
@Anonymous I did have it but it was a year old 😄
😆 1
Avatar
Anonymous 20-Jul-20 01:44 PM
@Anonymous Try the same after activating the virtual environment in anaconda prompt.
@Anonymous could you explain a bit more on that
Avatar
Anonymous 20-Jul-20 01:44 PM
@Anonymous how are you going with it then?
Avatar
Anonymous 20-Jul-20 01:44 PM
trying with a virtual env now
Avatar
Anonymous 20-Jul-20 01:44 PM
i confuse such things
@Anonymous Do exactly like I say. Type the below command : jupyter notebook D:\QuantumComputing (fill the rest of the path)
Avatar
Anonymous 20-Jul-20 01:44 PM
I still can't import qiskit in the notebook
Avatar
Anonymous 20-Jul-20 01:46 PM
Try updating numpy and scipy
Avatar
Anonymous 20-Jul-20 01:46 PM
@Anonymous any snapshot?
Avatar
Anonymous 20-Jul-20 01:46 PM
@Anonymous could you explain a bit more on that
@Anonymous Have you created any virtual env on anaconda?
Avatar
Anonymous 20-Jul-20 01:47 PM
@Anonymous install qiskit in a virtual env worked for me
Avatar
Anonymous 20-Jul-20 01:47 PM
Okay
Avatar
Anonymous 20-Jul-20 01:47 PM
@Anonymous any snapshot?
@Anonymous (Wen-Sen) it easily says No module named 'qiskit'. Hovewer, I work in the env with qiskit installed
Avatar
Anonymous 20-Jul-20 01:47 PM
@Anonymous have u tried this? pip install --upgrade qiskit
👍 1
have u switched to that env? @Anonymous (edited)
Avatar
Anonymous 20-Jul-20 01:48 PM
@Anonymous have u tried this? pip install --upgrade qiskit
@Anonymous (Wen-Sen) yes, I did it directly in the notebook !pip install --upgrade qiskit
have u switched to that env? @Anonymous
@Anonymous (Wen-Sen) sure. I am in
Avatar
Anonymous 20-Jul-20 01:49 PM
@Anonymous Lanes is the best TA! Thanks for the help!
Avatar
Anonymous BOT 20-Jul-20 01:49 PM
Your hand has been raised! A mentor will drop in as soon as they are available.
Avatar
Anonymous 20-Jul-20 01:50 PM
Was anyone here able to install this successfully in Google Colab?
Avatar
Anonymous 20-Jul-20 01:50 PM
Getting this error on trying to install the grading requirements, anyone able to help?
Avatar
Anonymous 20-Jul-20 01:50 PM
So I can submit the lab book after 12h right? Cos it is late and I need to sleep
@Anonymous Fitter as far as I know due is 31th
Avatar
Anonymous 20-Jul-20 01:50 PM
Pretty sure I have pip installed
Avatar
Anonymous 20-Jul-20 01:50 PM
I think they are due tomorrow
@Anonymous at the pdf they send (student guide) it says 31th is the due.
Avatar
Anonymous 20-Jul-20 01:50 PM
hello everyone, i just entered
Avatar
Anonymous 20-Jul-20 01:50 PM
Was anyone here able to install this successfully in Google Colab?
@Anonymous If I remember correctly, Colab does not work well with Qiskit, you might get into a lot of trouble. To be more specific, some dependencies of Colab conflicts with Qiskit the last I tried (edited)
Avatar
Anonymous 20-Jul-20 01:51 PM
Anyone uses ibmq for lab?
Avatar
Anonymous BOT 20-Jul-20 01:51 PM
Your hand has been raised! A mentor will drop in as soon as they are available.
Avatar
Anonymous 20-Jul-20 01:51 PM
@Anonymous If I remember correctly, Colab does not work well with Qiskit, you might get into a lot of trouble. To be more specific, some dependencies of Colab conflicts with Qiskit the last I tried
@Anonymous Thanks for letting me know. I'll keep working on installing it locally
Avatar
Anonymous 20-Jul-20 01:52 PM
Labs are due the 31st. You can revise submissions once solutions are out - goal is to learn!
Avatar
Anonymous 20-Jul-20 01:52 PM
I am receiving the following error at line 2 of the lab. Please advise, thank you:
Avatar
Anonymous 20-Jul-20 01:52 PM
@Anonymous Thanks for letting me know. I'll keep working on installing it locally
@Anonymous Np, will be glad to help if you met any trouble and are not using Windows
Avatar
Anonymous 20-Jul-20 01:52 PM
Anyone uses ibmq for lab?
@Anonymous Abe said earlier in this channel that it's really difficult to do this and we should only install locally
Avatar
Anonymous 20-Jul-20 01:52 PM
Avatar
Anonymous 20-Jul-20 01:52 PM
@Anonymous it's not recommended to use online services since the lab requires local dependencies and it could be difficult to upload the whole correct file dependencies online
Avatar
Anonymous 20-Jul-20 01:52 PM
scroll
Avatar
Anonymous 20-Jul-20 01:52 PM
@Anonymous Np, will be glad to help if you met any trouble and are not using Windows
@Anonymous I have a Mac so will do!
Avatar
Anonymous 20-Jul-20 01:53 PM
Hi I am having following problem I upgraded Qiskit as you have suggested to other but that did not work for me. The problem continues to persist even after I updated it.
Avatar
Anonymous 20-Jul-20 01:53 PM
the imgaug raise AttributeError: module 'numpy.random' has no attribute 'bit_generator' ? i don't know what errors is? can you help me,thank you
Avatar
Anonymous 20-Jul-20 01:53 PM
Hello, does anyone know how to print the matrix representation corresponding to the object QuantumCircuit?
Avatar
Anonymous 20-Jul-20 01:53 PM
Hi I am having following problem I upgraded Qiskit as you have suggested to other but that did not work for me. The problem continues to persist even after I updated it.
@Anonymous You might want to check you numpy, scipy and seaborn dependencies as well
Avatar
Anonymous 20-Jul-20 01:53 PM
is there a deadline for submissions?
Avatar
Anonymous 20-Jul-20 01:54 PM
is there a deadline for submissions?
@Anonymous U 31st July
Avatar
Anonymous 20-Jul-20 01:54 PM
@Anonymous Try ().data
Avatar
Anonymous 20-Jul-20 01:54 PM
@Anonymous Asfaw What is the ipywidgets dependecy for?
Avatar
Anonymous 20-Jul-20 01:54 PM
@Anonymous oh, you mean, all the labs?
Avatar
Anonymous 20-Jul-20 01:55 PM
@Anonymous oh, you mean, all the labs?
@Anonymous U Yes, that's what I heard
Avatar
Anonymous 20-Jul-20 01:55 PM
When will solutions to today's lab session be available?
Avatar
Anonymous 20-Jul-20 01:55 PM
@Anonymous Thanks a lot!
👍 1
Avatar
Anonymous 20-Jul-20 01:55 PM
@Anonymous Asfaw What is the ipywidgets dependecy for?
@Anonymous I think I see ... the animation part??
Avatar
Anonymous 20-Jul-20 01:55 PM
Will there be detailed solutions or only hints?
Avatar
Anonymous 20-Jul-20 01:56 PM
When will solutions to today's lab session be available?
@Anonymous Tomorrow I believe
Avatar
Anonymous 20-Jul-20 01:56 PM
No module named 'grading_tools' what do do if I am getting this error I have opened the jupyter notebook on my laptop locally
Avatar
Anonymous 20-Jul-20 01:56 PM
No module named 'grading_tools' what do do if I am getting this error I have opened the jupyter notebook on my laptop locally
@Anonymous Did you download the entire folder?
Avatar
Anonymous 20-Jul-20 01:56 PM
@Anonymous I think I see ... the animation part??
@Anonymous We added a nice widget to help visualize the effect of gates on single-qubit states. That widget needs ipywidgets
Avatar
Anonymous 20-Jul-20 01:56 PM
@Anonymous I mean mycircuit.data
Avatar
Anonymous 20-Jul-20 01:56 PM
I... am very lost
Avatar
Anonymous 20-Jul-20 01:56 PM
Hey, Will there be detailed solutions or only hints?
Avatar
Anonymous 20-Jul-20 01:56 PM
@Anonymous yes but i have opened only the jupyter notebook
Avatar
Anonymous 20-Jul-20 01:57 PM
@Anonymous yes but i have opened only the jupyter notebook
@Anonymous Unzip everything in zip1, should see a folder named grading_tools inside the zip (edited)
Avatar
Anonymous 20-Jul-20 01:58 PM
yes i see that what should i do with the folder
Avatar
Anonymous 20-Jul-20 01:58 PM
what does 'mpl' do in the draw routine?
Avatar
Anonymous 20-Jul-20 01:58 PM
just finished the lab so dm me if u need help 🙂
Avatar
Anonymous 20-Jul-20 01:58 PM
yes i see that what should i do with the folder
@Anonymous just unzop the entire lab1 folder and cd to that directory and launch jupyter lab there, you should be all set
what does 'mpl' do in the draw routine?
@Anonymous U makes the drawing nicer, you may change it to ascii if you are old-styled! (edited)
Avatar
Anonymous 20-Jul-20 01:58 PM
@Anonymous You might want to check you numpy, scipy and seaborn dependencies as well
@Anonymous I updated all of them and that problem is still there @Anonymous Asfaw @Anonymous V @Anonymous Lanes
Avatar
Anonymous 20-Jul-20 01:59 PM
what does 'mpl' do in the draw routine?
@Anonymous U A nice visit to the documentation might help 🙂 https://qiskit.org/documentation/stubs/qiskit.circuit.QuantumCircuit.draw.html
Avatar
Anonymous 20-Jul-20 01:59 PM
what does 'mpl' do in the draw routine?
@Anonymous U it uses the matplotlib package instead of simple text to draw quantum circuits
qiskitsmart 1
Avatar
Anonymous 20-Jul-20 01:59 PM
ah i see @Anonymous Thank you very much for your help i just realised they were not in the same folder
👍 1
Avatar
Anonymous 20-Jul-20 02:00 PM
@Anonymous Great! Thanks
@Anonymous Co Thanks!
Avatar
Anonymous 20-Jul-20 02:01 PM
tip: if you are using circuit.draw() it may not work if it is not the last line in that case use display(circuit.draw())
Avatar
Anonymous 20-Jul-20 02:01 PM
Can anyone please clarify whether tomorrow detailed solutions or just hints be available?
For the labs
Avatar
Anonymous 20-Jul-20 02:02 PM
I believe that they will be solutions.
Avatar
Anonymous 20-Jul-20 02:03 PM
@Anonymous I mean mycircuit.data
@Anonymous U I tried, it didnt work. Someone told me to use from qiskit.quantum_info import Operator O = Operator(circuit) and it does the job
tip: if you are using circuit.draw() it may not work if it is not the last line in that case use display(circuit.draw())
@Anonymous Thanks! this is very helpful
Avatar
Anonymous 20-Jul-20 02:05 PM
Guys, hopefully this would help if you are running into issues with Qiskit installation, dependencies, etc. Please make sure you have these installed:
pip install qiskit pip install qiskit-ibmq-provider[visualization] pip install qiskit-terra[visualization] pip install matplotlib pip install jupyter pip install ipywidgets pip install seaborn pip install pygments
Avatar
Anonymous 20-Jul-20 02:07 PM
@Anonymous Yes, I'm sorry, it doesn't work the way I said
Avatar
Anonymous 20-Jul-20 02:07 PM
@Anonymous Yes, I'm sorry, it doesn't work the way I said
@Anonymous U Thanks anyway!
Avatar
Anonymous 20-Jul-20 02:11 PM
Are we going to have lecture notes of today's lecture?
Avatar
Anonymous 20-Jul-20 02:12 PM
for me to work (linux), I created a new environement and install qiskit on it using pip
Avatar
Anonymous 20-Jul-20 02:14 PM
I am Jeelkumar and I am looking for study group!
Avatar
Anonymous 20-Jul-20 02:15 PM
do any of yall know if there'll be a place to upload our labs?
Avatar
Anonymous 20-Jul-20 02:15 PM
in mycircuit.h(0), I understood h means hadamard, what does 0 mean?
Avatar
Anonymous 20-Jul-20 02:15 PM
I have this error: cannot import name 'random_quantum_channel'
Avatar
Anonymous 20-Jul-20 02:15 PM
in mycircuit.h(0), I understood h means hadamard, what does 0 mean?
@Anonymous that a hadamard gate is being applied to the 0 qubit
Avatar
Anonymous 20-Jul-20 02:16 PM
Hey guys, anyone having issues importing the widgets from the files shared by Abe Asfaw ?
Avatar
Anonymous 20-Jul-20 02:16 PM
in mycircuit.h(0), I understood h means hadamard, what does 0 mean?
@Anonymous It means you’re applying the Hadamard (H) gate to the first qubit in your circuit. As is common in computing, counting starts from 0.
Avatar
Anonymous 20-Jul-20 02:16 PM
Hey guys, anyone having issues importing the widgets from the files shared by Abe Asfaw ?
@Anonymous did you copy the folders that came inside the zip file?
Avatar
Anonymous 20-Jul-20 02:17 PM
@Anonymous
from qiskit import * from qiskit.quantum_info import Operator qc = QuantumCircuit(5) Operator(qc)
Avatar
Anonymous 20-Jul-20 02:17 PM
@Anonymous It means you’re applying the Hadamard (H) gate to the first qubit in your circuit. As is common in computing, counting starts from 0.
@Anonymous Yes, thank you! got it
👍 1
Avatar
Anonymous 20-Jul-20 02:18 PM
@Anonymous are we supposed to unzip and upload the whole folder on jupyter notebook ? I only uploaded the exercise file on jupyter.
👍 2
Avatar
Anonymous 20-Jul-20 02:19 PM
>
@Anonymous are we supposed to unzip and upload the whole folder on jupyter notebook ? I only uploaded the exercise file on jupyter. @Anonymous yes, you need to upload the entire folder as is. The error means it's looking for the resources folder in the same folder the jupyter file is
Avatar
Anonymous 20-Jul-20 02:19 PM
@Anonymous are we supposed to unzip and upload the whole folder on jupyter notebook ? I only uploaded the exercise file on jupyter.
@Anonymous As I have understood, all we have to do is to run the last cell in the .ipynb file we were sent for it to be graded. No need to upload anyting. Correct me if I'm wrong.
Avatar
Anonymous 20-Jul-20 02:20 PM
@Anonymous As I have understood, all we have to do is to run the last cell in the .ipynb file we were sent for it to be graded. No need to upload anyting. Correct me if I'm wrong.
@Anonymous before you start working on the jpyter file you need to extract the entire zip file together and respect the folder hierarchy - so it can find the resources it needs. This is before you even open jupyter notebooks and start working on the exercises
Avatar
Anonymous 20-Jul-20 02:21 PM
@Anonymous i will try that then. Thanks mate !
Avatar
Anonymous 20-Jul-20 02:21 PM
sv = Statevector.from_label('00') this makes the state |00> is there a way to make |00> + I01> directly or we should apply ? Something like sv = Statevector.from_label('00','11') I tried this it is giving me errors
May be I am thinking too much like they are arrays
Avatar
Anonymous 20-Jul-20 02:21 PM
May be I am thinking too much like they are arrays
@Anonymous indeed 🙂
Avatar
Anonymous 20-Jul-20 02:22 PM
@Anonymous before you start working on the jpyter file you need to extract the entire zip file together and respect the folder hierarchy - so it can find the resources it needs. This is before you even open jupyter notebooks and start working on the exercises
@Anonymous Great, thanks!
Avatar
Anonymous 20-Jul-20 02:22 PM
@Anonymous I've the same problem, how did you fix that?
Avatar
Anonymous 20-Jul-20 02:23 PM
@Anonymous before you start working on the jpyter file you need to extract the entire zip file together and respect the folder hierarchy - so it can find the resources it needs. This is before you even open jupyter notebooks and start working on the exercises
@Anonymous on the subject of grading that is correct - once you get to the final cell you run it and underlying code will check, validate, and upload your grades to a server the moderators control
👍 1
Avatar
Anonymous 20-Jul-20 02:27 PM
so if I send the answer and it replied correct, that means I'm done and you guys got my answer, right?
Avatar
Anonymous 20-Jul-20 02:28 PM
I have a question, in the section measurements, in the line mycircuit.measure([0,1], [0,1]) if i change that line to mycircuit.measure([1], [1]) i get this output, can someone help me understand it?
Avatar
Anonymous 20-Jul-20 02:28 PM
how can I create a circuit that gives me \sqrt(0,7) ? help me please
I have a question, in the section measurements, in the line mycircuit.measure([0,1], [0,1]) if i change that line to mycircuit.measure([1], [1]) i get this output, can someone help me understand it?
@Anonymous Fonseca it means that you only are performing a measurement on the second qubit
Avatar
Anonymous 20-Jul-20 02:30 PM
@Anonymous Fonseca it means that you only are performing a measurement on the second qubit
@Anonymous that's the intention, but i don't understand the plot
are the qubits q0 and q1 set to Operation by default?
Avatar
Anonymous 20-Jul-20 02:31 PM
yes, always set to \ket{0}
Avatar
Anonymous 20-Jul-20 02:31 PM
are the qubits q0 and q1 set to Operation by default?
@Anonymous Fonseca yes
Avatar
Anonymous 20-Jul-20 02:31 PM
Is there any way to set a specific qubit in a circuit?
Avatar
Anonymous 20-Jul-20 02:31 PM
help me with this please, how can I create a circuit that gives me \sqrt(0,7) and \sqrt(0,3)
Avatar
Anonymous 20-Jul-20 02:31 PM
I can't seem to find the initialize function they mention
Avatar
Anonymous 20-Jul-20 02:31 PM
Is there any way to set a specific qubit in a circuit?
@Anonymous Ramachandran same question
Avatar
Anonymous 20-Jul-20 02:32 PM
Does $\latex$ work here?
Avatar
Anonymous 20-Jul-20 02:33 PM
is it bettter to use anaconda locally to run the lab or to use ibm's jupyter online platform or colab?
Avatar
Anonymous 20-Jul-20 02:33 PM
I can't seem to find the initialize function they mention
@Anonymous Ramachandran i can get the input qubit that they want but not using a circuit just using numpy
im not sure if its correct
Avatar
Anonymous 20-Jul-20 02:34 PM
@Anonymous Thanks, it is running for me too
Avatar
Anonymous 20-Jul-20 02:34 PM
Got it!! :3
💯 3
Avatar
Anonymous 20-Jul-20 02:34 PM
help me with this please, how can I create a circuit that gives me \sqrt(0,7) and \sqrt(0,3)
@Anonymous So you start by creating an array with this and then use <circuit name>.initialize(array, [target qubit])
Avatar
Anonymous 20-Jul-20 02:35 PM
💯 7
Avatar
Anonymous 20-Jul-20 02:35 PM
Just to make sure. After finding out the solution tommorow. We can resubmit the work?
Avatar
Anonymous 20-Jul-20 02:35 PM
I can't seem to find the initialize function they mention
@Anonymous Ramachandran <circuit>.initialize(<target_array>, <target_qubit>)
Avatar
Anonymous 20-Jul-20 02:36 PM
Thanks!
Avatar
Anonymous 20-Jul-20 02:37 PM
ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'grading_tools/requirements.txt'
Avatar
Anonymous 20-Jul-20 02:37 PM
When I open the notebook, I get an error that prevents me from running the code blocks: ImportError: DLL load failed while importing win32api: The specified module could not be found.
Avatar
Anonymous 20-Jul-20 02:37 PM
When is lab work due ?
Avatar
Anonymous 20-Jul-20 02:38 PM
By when should we submit the lab
Avatar
Anonymous 20-Jul-20 02:39 PM
I understood the circuits, but what I could not understand were the angles and sphere sizes. When you apply X on 1 (0.0 angle), it becomes 0 (0.0 angle)? Shouldn't they be opposites (0 and 180)?
Avatar
Anonymous 20-Jul-20 02:39 PM
Where do we need to submit the work? Do we need to upload anywhere?
Avatar
Anonymous 20-Jul-20 02:40 PM
@Anonymous we got time untill the las day of the course, you can resubmit untill you are comfortable with your program. It's all about learning!!
Avatar
Anonymous 20-Jul-20 02:40 PM
The Jupyter Notebook includes code that you run that will submit for you I think.
Avatar
Anonymous 20-Jul-20 02:40 PM
Where do we need to submit the work? Do we need to upload anywhere?
@Anonymous If I understood correctly, running the last cell submuits it
Avatar
Anonymous 20-Jul-20 02:40 PM
I understood the circuits, but what I could not understand were the angles and sphere sizes. When you apply X on 1 (0.0 angle), it becomes 0 (0.0 angle)? Shouldn't they be opposites (0 and 180)?
@Anonymous Rosetti - YggBrasil Pauli-X does only bit flip.
👍 1
Avatar
Anonymous 20-Jul-20 02:40 PM
@Anonymous yes. As many times as you please
👍 1
Avatar
Anonymous 20-Jul-20 02:41 PM
Hey guys, how do I find the lecture notes?
Avatar
Anonymous 20-Jul-20 02:41 PM
I worked through the ungraded portions. For graded ex1, how exactly do we use the initialize function
🤔 1
👍 1
Avatar
Anonymous 20-Jul-20 02:41 PM
Hey, when shall we get the lab solutions?
Avatar
Anonymous 20-Jul-20 02:42 PM
circuit.initialize(state, index)
it is a method in python
Avatar
Anonymous 20-Jul-20 02:42 PM
@Anonymous tomorrow by 1:30pm EDT
Avatar
Anonymous 20-Jul-20 02:42 PM
I worked through the ungraded portions. For graded ex1, how exactly do we use the initialize function
@Anonymous QuantumCircuit.initialize([alpha, beta], index)
👍 4
Avatar
Anonymous 20-Jul-20 02:43 PM
thanks! I would also need to explicitly write out the coefficients for each subvector, I imagine
Avatar
Anonymous 20-Jul-20 02:44 PM
?
Avatar
Anonymous 20-Jul-20 02:44 PM
@Anonymous ``` from qiskit import * from qiskit.quantum_info import Operator
>
qc = QuantumCircuit(5) Operator(qc) ```
@Anonymous Nation Thanks, Paul.
Avatar
Anonymous 20-Jul-20 02:44 PM
@Anonymous https://www.crowdcast.io/e/qgss-day1 you'll need your user and the password for today. you can find the textbook here https://qiskit.org/textbook/preface.html
Register now for Qiskit Events's event on Crowdcast, scheduled to go live on Monday July 20, 2020 at 9:00 am EDT.
A university quantum algorithms/computation course supplement based on Qiskit
Avatar
Anonymous 20-Jul-20 02:45 PM
@Anonymous tomorrow by 1:30pm EDT
@Anonymous will it be the code itself or just hints?
Avatar
Anonymous 20-Jul-20 02:45 PM
@Anonymous sorry, I don't have that answer but I supposed it will be the code
Avatar
Anonymous 20-Jul-20 02:46 PM
How can we get the index of a given bit in a circuit let's say creg1_Alice
Avatar
Anonymous 20-Jul-20 02:46 PM
@Anonymous sorry, I don't have that answer but I supposed it will be the code
@Anonymous alright!
Avatar
Anonymous 20-Jul-20 02:47 PM
How can we get the index of a given bit in a circuit let's say creg1_Alice
@Anonymous creg1_Alice[index]
Avatar
Anonymous 20-Jul-20 02:48 PM
Thanks!
👍 1
Avatar
Anonymous 20-Jul-20 02:49 PM
No grading module error
Avatar
Anonymous 20-Jul-20 02:49 PM
make sure you have the two folders in the same directory as your jupyter notebook
👍 1
Avatar
Anonymous 20-Jul-20 02:52 PM
how to check if the submission is successful ah
is it enough?
Avatar
Anonymous 20-Jul-20 02:53 PM
AttributeError: 'Statevector' object has no attribute 'sample_counts'
Avatar
Anonymous 20-Jul-20 02:54 PM
is it enough?
@Anonymous Yeah that's correct
Avatar
Anonymous 20-Jul-20 02:54 PM
I see. Thx
Avatar
Anonymous 20-Jul-20 02:54 PM
But When i try to submit again I get only this : lab1/ex1 - 🎉 Correct
Is that the case with everyone?
Avatar
Anonymous 20-Jul-20 02:55 PM
it is for me
Avatar
Anonymous 20-Jul-20 02:55 PM
where is the record submitted
Avatar
Anonymous 20-Jul-20 02:56 PM
it only shows stats when there is an opdate on the server side
Avatar
Anonymous 20-Jul-20 02:56 PM
once the answer is complete
Avatar
Anonymous 20-Jul-20 02:56 PM
where is the record submitted
@Anonymous Singh It's directly sent to the team.
it only shows stats when there is an opdate on the server side
@Anonymous Oh ! Thanks
Avatar
Anonymous 20-Jul-20 02:57 PM
Thanks @Anonymous Anand
Avatar
Anonymous 20-Jul-20 02:58 PM
it would be nice to have a command to check stats
currently only shows on the first correct submission i think
Avatar
Anonymous 20-Jul-20 02:59 PM
it only shows stats when there is an opdate on the server side
@Anonymous That's right I just checked again!!!
Avatar
Anonymous 20-Jul-20 02:59 PM
on updates I mean
Avatar
Anonymous 20-Jul-20 02:59 PM
just to confirm we dont need to submit the answer within 1 hour right?
Avatar
Anonymous 20-Jul-20 03:00 PM
Yes @Anonymous
Avatar
Anonymous 20-Jul-20 03:00 PM
it would be nice to have a command to check stats
@Anonymous
Avatar
Anonymous 20-Jul-20 03:00 PM
on updates I mean
@Anonymous Yes It would be easy to check!
Avatar
Anonymous 20-Jul-20 03:00 PM
yea I mean they call it 1-hour-lab it had me worried lol
Avatar
Anonymous 20-Jul-20 03:01 PM
1 hour lab means it can be solved in 1-hour.
Avatar
Anonymous 20-Jul-20 03:02 PM
i see. it means I still have much to learn haha
need to hone the intuition and stuff
thx anyways
Avatar
Anonymous 20-Jul-20 03:04 PM
Good afternoon
I've installed jupyter notebook
When I want to create a new one, I don't have the option to select Python 3
Avatar
Anonymous 20-Jul-20 03:07 PM
Check the python version in your system!
Avatar
Anonymous 20-Jul-20 03:07 PM
I have python 3.6.9
Avatar
Anonymous 20-Jul-20 03:08 PM
When I want to create a new one, I don't have the option to select Python 3
@Anonymous Which version of Python do you see in the Jupyter Notebook (edited)
Avatar
Anonymous 20-Jul-20 03:08 PM
@Anonymous Which version of Python do you see?
@Anonymous 3.6.9
I'm using Ubuntu 18.04
Avatar
Anonymous 20-Jul-20 03:09 PM
how did you install jupyter?
you'd install it on that python version, right?
Avatar
Anonymous 20-Jul-20 03:10 PM
Hello @Anonymous I got an email saying I was part of the 2000 students who were enrolled in both the lec and the labs last week. But I didn't receive any emails today about the labs. I've been finding discord very confusing in terms of helping with this issue. Should I email you guys or should I stop trying to find out and creating more spam for you guys?
Avatar
Anonymous 20-Jul-20 03:10 PM
conda create -n py36 python=3.6 anaconda
try this
Avatar
Anonymous 20-Jul-20 03:11 PM
Hello @Anonymous I got an email saying I was part of the 2000 students who were enrolled in both the lec and the labs last week. But I didn't receive any emails today about the labs. I've been finding discord very confusing in terms of helping with this issue. Should I email you guys or should I stop trying to find out and creating more spam for you guys?
@Anonymous All the instructions for the lab can be found in the #lab-exercises channel
👍 1
Avatar
Anonymous 20-Jul-20 03:11 PM
you'd install it on that python version, right?
@Anonymous That's a good question xD. I installed last week, so probably I wasn't aware of the version
Avatar
Anonymous 20-Jul-20 03:11 PM
or you can upgrade python using -> conda install python=3.6
Avatar
Anonymous 20-Jul-20 03:11 PM
try this
@Anonymous Anand Got it
Okey
👍 1
Avatar
Anonymous 20-Jul-20 03:12 PM
at least for me, I had to make doubly sure that jupyter was installed on python3x (edited)
I'd go: python3 -m pip install notebook or pip3 install notebook
Avatar
Anonymous 20-Jul-20 03:13 PM
I'd go: python3 -m pip install notebook or pip3 install notebook
@Anonymous Is it possible to have two versions of pupyter under the two different python versions?
jupyter**
Avatar
Anonymous 20-Jul-20 03:13 PM
Hi, I got this error. Any possible reason?
Avatar
Anonymous 20-Jul-20 03:13 PM
it's a python package, sooo I believe you can have it in different enviroments cause that's what anaconda's job is
Avatar
Anonymous 20-Jul-20 03:14 PM
Interesting
Avatar
Anonymous 20-Jul-20 03:14 PM
Hello, I've been having problems installing qiskit-aer. However, withouot it, most cell blokcs are running just fine. Is it needed?
Avatar
Anonymous 20-Jul-20 03:14 PM
I had that same issue lol
I can't plot the qsphere without it
but I had it fixed once I had a new env set up with anaconda and re-did my installs
Avatar
Anonymous 20-Jul-20 03:15 PM
Hi, I got this error. Any possible reason?
@Anonymous You are able to draw the circuit?
Avatar
Anonymous 20-Jul-20 03:15 PM
@Anonymous Anand Yes
Avatar
Anonymous 20-Jul-20 03:15 PM
@Anonymous Just to be clear, the labs need to be submitted in 1 hr from 1:00pm EDT, OR the time required to solve the labs should be one hour and we can solve it according to our schedule. Please let me know. (edited)
Avatar
Anonymous 20-Jul-20 03:15 PM
I also have encrypted answer file in the directory
Avatar
Anonymous 20-Jul-20 03:16 PM
@Anonymous Anand Yes
@Anonymous May be try restarting the kernel and try again?
Avatar
Anonymous 20-Jul-20 03:17 PM
I am still getting the error: ModuleNotFoundError: No module named 'grading_tools'
Avatar
Anonymous 20-Jul-20 03:17 PM
Btw, do I have to create a new anaconda environment each time I have to work on qiskit?
Avatar
Anonymous 20-Jul-20 03:17 PM
I have all the files in the same directory
Avatar
Anonymous 20-Jul-20 03:17 PM
@Anonymous all labs must be submitted by the end of the course (don't remember the exact date off the top of my head), NOT within 1 hr of issue
Avatar
Anonymous 20-Jul-20 03:18 PM
Ok cool Thanks, Aidan!!👍
Avatar
Anonymous 20-Jul-20 03:18 PM
@Anonymous May be try restarting the kernel and try again?
@Anonymous Anand Nope, but thanks.
Avatar
Anonymous 20-Jul-20 03:18 PM
Btw, do I have to create a new anaconda environment each time I have to work on qiskit?
@Anonymous No, just the one time. You should be able to activate/deactivate it and use it
Avatar
Anonymous 20-Jul-20 03:19 PM
Got it
Avatar
Anonymous 20-Jul-20 03:19 PM
@Anonymous Just to be clear, the labs need to be submitted in 1 hr from 1:00pm EDT, OR the time required to solve the labs should be one hour and we can solve it according to our schedule. Please let me know.
@Anonymous No, the deadline for all final lab work is 11:59 EDT on July 31st. As long as you submit everything before then, you should be fine. The reason for assigning the 1hr time allotment is just to give a estimated amount of time it could take to finish the exercise 🙂
👍 3
Avatar
Anonymous 20-Jul-20 03:19 PM
Sorry for the questions xD. This is advanced python to me
Avatar
Anonymous 20-Jul-20 03:19 PM
I am still getting the error: ModuleNotFoundError: No module named 'grading_tools'
@Anonymous You don't have to change the files and directory... just open the ex1.ipynb file in Jupyter Notebook
Avatar
Anonymous 20-Jul-20 03:20 PM
It's been less python and more fidly enviroment stuff for me so far lol
Avatar
Anonymous 20-Jul-20 03:20 PM
@Anonymous No, the deadline for all final lab work is 11:59 EDT on July 31st. As long as you submit everything before then, you should be fine. The reason for assigning the 1hr time allotment is just to give a estimated amount of time it could take to finish the exercise 🙂
@Anonymous Co Ok Cool, Thanks Harold!!
👍 2
Avatar
Anonymous 20-Jul-20 03:21 PM
My grading cell is running for more than 5 minutes, and not showing any output.... Any help??
Avatar
Anonymous 20-Jul-20 03:22 PM
@Anonymous You don't have to change the files and directory... just open the ex1.ipynb file in Jupyter Notebook
@Anonymous Anand I did'nt change the directory. I just opened the ex1.ipynb in jupyter, and ran the code.
Avatar
Anonymous 20-Jul-20 03:22 PM
Is that it? I mean is my answer fully submitted ?
Avatar
Anonymous 20-Jul-20 03:23 PM
I passed
Avatar
Anonymous 20-Jul-20 03:24 PM
@Anonymous Anand I did'nt change the directory. I just opened the ex1.ipynb in jupyter, and ran the code.
@Anonymous and you're still getting no module found?
Avatar
Anonymous 20-Jul-20 03:25 PM
@Anonymous and you're still getting no module found?
@Anonymous Anand yes.
Avatar
Anonymous 20-Jul-20 03:26 PM
conda create -n py36 python=3.6 anaconda
@Anonymous Anand It worked :v Thank you so much
👍 1
Avatar
Anonymous 20-Jul-20 03:26 PM
@Anonymous try starting from the top again '!pip install -U -r grading_tools/requirements.txt from IPython.display import clear_output clear_output()'
👍 1
Avatar
Anonymous 20-Jul-20 03:26 PM
@Anonymous try starting from the top again '!pip install -U -r grading_tools/requirements.txt
>
from IPython.display import clear_output clear_output()'
@Anonymous ok. I will try that.
Avatar
Anonymous 20-Jul-20 03:28 PM
How long is it taking for the grade cell to execute? Its been over 20 minutes since my cell is running, and not showing any output
Avatar
Anonymous 20-Jul-20 03:28 PM
how many times are we allowed to submit?
Avatar
Anonymous 20-Jul-20 03:29 PM
ModuleNotFoundError: No module named 'qiskitModuleNotFoundError: No module named 'qiskit' I have that problem
I pasted twice xD
Avatar
Anonymous 20-Jul-20 03:29 PM
Hey guys, anyone having issues importing the widgets from the files shared by Abe Asfaw ?
@Anonymous Yes I have this same issue. Did you figure it out? I see the resources folder in the extraction
Avatar
Anonymous 20-Jul-20 03:29 PM
ModuleNotFoundError: No module named 'qiskitModuleNotFoundError: No module named 'qiskit'
>
I have that problem
@Anonymous You'll need to run pip3 install qiskit
Avatar
Anonymous 20-Jul-20 03:29 PM
@Anonymous You'll need to run pip3 install qiskit
@Anonymous Got it
Avatar
Anonymous 20-Jul-20 03:30 PM
you can do that in jupyter notebook by putting an '!' mark in front of it
Avatar
Anonymous 20-Jul-20 03:30 PM
@Anonymous and you're still getting no module found?
@Anonymous Anand Still getting the same error
Avatar
Anonymous 20-Jul-20 03:30 PM
you can do that in jupyter notebook by putting an '!' mark in front of it
@Anonymous !pip3 install qiskit. That's what you say
Avatar
Anonymous 20-Jul-20 03:31 PM
@Anonymous Anand Still getting the same error
@Anonymous is there a init.py file inside grading tools folder?
Avatar
Anonymous 20-Jul-20 03:31 PM
@Anonymous !pip3 install qiskit. That's what you say
@Anonymous yup, pretty much
Avatar
Anonymous 20-Jul-20 03:31 PM
How does QuantumCircuit.measure know in which basis to measure? I mean, is it looking to measure in simply the qubit basis?
Avatar
Anonymous 20-Jul-20 03:31 PM
How long is it taking for the grade cell to execute? Its been over 20 minutes since my cell is running, and not showing any output
@Anonymous It shouldn't take much time
Avatar
Anonymous 20-Jul-20 03:32 PM
How does QuantumCircuit.measure know in which basis to measure? I mean, is it looking to measure in simply the qubit basis?
@Anonymous QuantumCircuit.measure measures the Registers
Avatar
Anonymous 20-Jul-20 03:33 PM
@Anonymous It shouldn't take much time
@Anonymous Anand Its been over 20 minutes and no output from the cell
Avatar
Anonymous 20-Jul-20 03:33 PM
@Anonymous is there a init.py file inside grading tools folder?
@Anonymous Anand yes
Avatar
Anonymous 20-Jul-20 03:33 PM
>
@Anonymous Anand yes @Anonymous May be save your solution somewhere and try downloading the zipped file again from discord and try! It might work
@Anonymous Anand Its been over 20 minutes and no output from the cell
@Anonymous You can restart the kernel and try again!
Avatar
Anonymous 20-Jul-20 03:35 PM
Does anyone knows what this error means? "lab1/ex1 - ❌ Failed: 'Data for experiment "circuit88" could not be found.'"
Avatar
Anonymous 20-Jul-20 03:35 PM
@Anonymous You can restart the kernel and try again!
@Anonymous Anand I have already done that
Avatar
Anonymous 20-Jul-20 03:35 PM
@Anonymous You can restart the kernel and try again!
@Anonymous Anand Yep tried that twice, no results
Avatar
Anonymous 20-Jul-20 03:36 PM
Does anyone knows what this error means? "lab1/ex1 - ❌ Failed: 'Data for experiment "circuit88" could not be found.'"
@Anonymous Me too. I couldn't figure out yet.
Avatar
Anonymous 20-Jul-20 03:36 PM
Did you run the very first cell in the notebook?
Avatar
Anonymous 20-Jul-20 03:40 PM
Comment out the 'clear_output' line in the first cell and check if its throwing any error
Avatar
Anonymous 20-Jul-20 03:41 PM
how many times are we allowed to submit?
@Anonymous Asfaw (I'm sorry if I missed this info earlier)
Avatar
Anonymous 20-Jul-20 03:43 PM
@Anonymous Anand got a permission problem, checking now
Avatar
Anonymous 20-Jul-20 03:43 PM
Yeah i request everyone who's facing issue to try that out!
Avatar
Anonymous 20-Jul-20 03:43 PM
unlimited if you want
@Anonymous Asfaw (I'm sorry if I missed this info earlier)
@Anonymous
👍 1
Avatar
Anonymous 20-Jul-20 03:44 PM
@Anonymous Anand got a permission problem, checking now
@Anonymous Please inform me if you solve.
👍 1
Avatar
Anonymous 20-Jul-20 03:45 PM
I'm getting this error when I run measure in the bell_meas_Alice_qubits function. Anyone knows what might be the issue? CircuitError: "Type error handling [ClassicalRegister(1, 'c10'), ClassicalRegister(1, 'c11')] (<class 'list'>)"
Avatar
Anonymous 20-Jul-20 03:46 PM
I'm getting this error when I run measure in the bell_meas_Alice_qubits function. Anyone knows what might be the issue?
>
CircuitError: "Type error handling [ClassicalRegister(1, 'c10'), ClassicalRegister(1, 'c11')] (<class 'list'>)"
@Anonymous Try writing two separate lines for the two ClassicalRegisters
👍 1
Avatar
Anonymous 20-Jul-20 03:47 PM
@Anonymous Try writing two separate lines for the two ClassicalRegisters
@Anonymous Anand Tried it already, it shows the same error, but for only one of the Classical Registers
Avatar
Anonymous 20-Jul-20 03:47 PM
@Anonymous Anand Tried it already, it shows the same error, but for only one of the Classical Registers
@Anonymous I had the same issue and it worked for me!
Avatar
Anonymous 20-Jul-20 03:49 PM
Got it! I left each one in a single line and got rid of the the []s
👍 3
Not looking very pretty with the Measurement and Hadamard on top of each other, but it seems to be right
💯 1
Avatar
Anonymous 20-Jul-20 03:56 PM
Not looking very pretty with the Measurement and Hadamard on top of each other, but it seems to be right
@Anonymous you can add a barrier after your H and before measurement for better looks
💯 1
Avatar
Anonymous 20-Jul-20 03:56 PM
Not looking very pretty with the Measurement and Hadamard on top of each other, but it seems to be right
@Anonymous You can put a barrier between the last Hadamard and the measurements 🙂
💯 1
Avatar
Anonymous 20-Jul-20 03:57 PM
I do not know why I have to index classical registers? given_circuit.measure([qubit1_Alice, qubit2_Alice],[clbit1_Alice[0], clbit2_Alice[0]])
Did not want to work otherwise
Avatar
Anonymous 20-Jul-20 03:58 PM
Should the Q spheres be looking like this, or is it an error?
Avatar
Anonymous 20-Jul-20 03:58 PM
Question remains after completing the exercise, how do I analyze the output of the circuit?
@Anonymous your Q sphere for |0> state looks right
Avatar
Anonymous 20-Jul-20 03:59 PM
So after we run the submit cell and it submits, we done?
Avatar
Anonymous 20-Jul-20 04:00 PM
Did not want to work otherwise
@Anonymous interesting, did you try type(clbit1_Alice) ? Is it a register or a bit
Avatar
Anonymous 20-Jul-20 04:01 PM
Not looking very pretty with the Measurement and Hadamard on top of each other, but it seems to be right
@Anonymous I keep getting "Failed" for the seemingly same circuit... 😕 do u as well?
Avatar
Anonymous 20-Jul-20 04:01 PM
You havent applied the X and Z gates
Avatar
Anonymous 20-Jul-20 04:02 PM
@Anonymous I keep getting "Failed" for the seemingly same circuit... 😕 do u as well?
@Anonymous I'm working on the last function now. Using python conditionals didn't work. I'm going to try conditional gates now (https://qiskit.org/documentation/tutorials/circuits/3_summary_of_quantum_operations.html#Conditional-operations)
👍 1
Avatar
Anonymous 20-Jul-20 04:02 PM
@Anonymous yes it is register and not a bit. that is why I indexed it to make it work. I just did not like my solution and was wondering about the proper way
👍 1
Avatar
Anonymous 20-Jul-20 04:03 PM
@Anonymous I'm working on the last function now. Using python conditionals didn't work. I'm going to try conditional gates now (https://qiskit.org/documentation/tutorials/circuits/3_summary_of_quantum_operations.html#Conditional-operations)
@Anonymous thanks for the tip!
Avatar
Anonymous 20-Jul-20 04:03 PM
@Anonymous thanks for the tip!
@Anonymous that was exactly the problem for me
👍 2
Avatar
Anonymous 20-Jul-20 04:04 PM
@Anonymous I keep getting "Failed" for the seemingly same circuit... 😕 do u as well?
@Anonymous Use c_if function in the last part, I suspect you used if function
qiskitsmart 1
👍 1
Avatar
Anonymous 20-Jul-20 04:05 PM
@Anonymous yes it is register and not a bit. that is why I indexed it to make it work. I just did not like my solution and was wondering about the proper way
@Anonymous honestly, I just added two measurements and never met this problem. Did you modify any part of code that we "shouldn't" be modifying?
Avatar
Anonymous 20-Jul-20 04:05 PM
@Anonymous Asfaw Getting this error
~/anaconda3/lib/python3.7/site-packages/qiskit/quantum_info/synthesis/two_qubit_decompose.py in <module> 494 495 --> 496 two_qubit_cnot_decompose = TwoQubitBasisDecomposer(CXGate()) ~/anaconda3/lib/python3.7/site-packages/qiskit/quantum_info/synthesis/two_qubit_decompose.py in __init__(self, gate, basis_fidelity) 285 self.gate = gate 286 self.basis_fidelity = basis_fidelity --> 287 basis = self.basis = TwoQubitWeylDecomposition(gate.to_matrix()) 288 289 # FIXME: find good tolerances ~/anaconda3/lib/python3.7/site-packages/qiskit/quantum_info/synthesis/two_qubit_decompose.py in __init__(self, unitary_matrix) 169 # D, P = la.eig(M2) # this can fail for certain kinds of degeneracy 170 for i in range(100): # FIXME: this randomized algorithm is horrendous --> 171 state = np.random.default_rng(i) 172 M2real = state.normal()*M2.real + state.normal()*M2.imag 173 _, P = la.eigh(M2real) AttributeError: module 'numpy.random' has no attribute 'default_rng'
(edited)
I did upgrade all the libs as I thought it is due to numpy version
Avatar
Anonymous 20-Jul-20 04:06 PM
@Anonymous Asfaw Getting this error ```~/anaconda3/lib/python3.7/site-packages/qiskit/quantum_info/synthesis/two_qubit_decompose.py in <module> 494 495 --> 496 two_qubit_cnot_decompose = TwoQubitBasisDecomposer(CXGate())
>
~/anaconda3/lib/python3.7/site-packages/qiskit/quantum_info/synthesis/two_qubit_decompose.py in init(self, gate, basis_fidelity) 285 self.gate = gate 286 self.basis_fidelity = basis_fidelity --> 287 basis = self.basis = TwoQubitWeylDecomposition(gate.to_matrix()) 288 289 # FIXME: find good tolerances
>
~/anaconda3/lib/python3.7/site-packages/qiskit/quantum_info/synthesis/two_qubit_decompose.py in init(self, unitary_matrix) 169 # D, P = la.eig(M2) # this can fail for certain kinds of degeneracy 170 for i in range(100): # FIXME: this randomized algorithm is horrendous --> 171 state = np.random.defaultrng(i) 172 M2real = state.normal()M2.real + state.normal()M2.imag 173 , P = la.eigh(M2real)
>
AttributeError: module 'numpy.random' has no attribute 'default_rng'```
@Anonymous Seems like you're using the random function, but it is not really needed for today's exercise
Avatar
Anonymous 20-Jul-20 04:07 PM
Nope I haven't used the random function this is the error what I am getting after running the first cell after installing all the packages
Avatar
Anonymous 20-Jul-20 04:07 PM
phew. Got it finally. Thank you guys!
💯 3
Avatar
Anonymous 20-Jul-20 04:07 PM
Nope I haven't used the random function this is the error what I am getting after running the first cell after installing all the packages
@Anonymous Woah, that's really weird
Avatar
Anonymous 20-Jul-20 04:07 PM
I do not know why I have to index classical registers? given_circuit.measure([qubit1_Alice, qubit2_Alice],[clbit1_Alice[0], clbit2_Alice[0]])
@Anonymous maybe try this ? given_circuit.measure([[qubit1_Alice], [qubit2_Alice]],[clbit1_Alice, clbit2_Alice]), this way we match register with register? (edited)
Avatar
Anonymous 20-Jul-20 04:09 PM
@Anonymous maybe try this ? given_circuit.measure([[qubit1_Alice], [qubit2_Alice]],[clbit1_Alice, clbit2_Alice]), this way we match register with register?
@Anonymous it should be ([qubit1_Alice, qubit2_Alice],[clbit1_Alice[0], clbit2_Alice[0])
Avatar
Anonymous 20-Jul-20 04:09 PM
@Anonymous Woah, that's really weird
@Anonymous Yes exactly
Avatar
Anonymous 20-Jul-20 04:10 PM
The clbit1 and clbit2 are passed in as Classical registers
thus you need to specify the index
Avatar
Anonymous 20-Jul-20 04:10 PM
@Anonymous it should be ([qubit1_Alice, qubit2_Alice],[clbit1_Alice[0], clbit2_Alice[0])
@Anonymous I think you can also pass a list of quantum registers and then a list of classical registers. which is how I did
Avatar
Anonymous 20-Jul-20 04:11 PM
Not looking very pretty with the Measurement and Hadamard on top of each other, but it seems to be right
@Anonymous did it get accepted?
Avatar
Anonymous 20-Jul-20 04:11 PM
the measure functions is Circuit.measure(q_indices, c_indices)
Avatar
Anonymous 20-Jul-20 04:11 PM
@Anonymous I'm working on the last function now. Using python conditionals didn't work. I'm going to try conditional gates now (https://qiskit.org/documentation/tutorials/circuits/3_summary_of_quantum_operations.html#Conditional-operations)
@Anonymous This was brilliant
qiskitwhite 1
Avatar
Anonymous 20-Jul-20 04:12 PM
@Anonymous did it get accepted?
@Anonymous I put a barrier between the Hadamard and the Measurement to make it look better. Didn't try submitting without it
Avatar
Anonymous 20-Jul-20 04:12 PM
@Anonymous I think you can also pass a list of quantum registers and then a list of classical registers. which is how I did
@Anonymous But the parameters should be indices I think
Avatar
Anonymous 20-Jul-20 04:12 PM
Hurray......Solved....Relieved
@Anonymous apparently Vampire managed to do it without the barrier
Avatar
Anonymous 20-Jul-20 04:13 PM
@Anonymous But the parameters should be indices I think
@Anonymous I might be wrong though, let me double check .
👍 1
Avatar
Anonymous 20-Jul-20 04:13 PM
is it possible to put several gates to the circuit in one line? also, how could we define a big gate that consists of several gates (e.g. the 00-bell state construction gate CNOT_01 * H_0)?
Avatar
Anonymous 20-Jul-20 04:15 PM
How do y'all have a have the initialize box written only the first qubits? Mine has the box around the first three.
Avatar
Anonymous 20-Jul-20 04:15 PM
How do y'all have a have the initialize box written only the first qubits? Mine has the box around the first three.
@Anonymous McGaha Did you use the initialize function with all those qubits as parameters?
Avatar
Anonymous 20-Jul-20 04:16 PM
@Anonymous Asfaw Getting this error ```~/anaconda3/lib/python3.7/site-packages/qiskit/quantum_info/synthesis/two_qubit_decompose.py in <module> 494 495 --> 496 two_qubit_cnot_decompose = TwoQubitBasisDecomposer(CXGate())
>
~/anaconda3/lib/python3.7/site-packages/qiskit/quantum_info/synthesis/two_qubit_decompose.py in init(self, gate, basis_fidelity) 285 self.gate = gate 286 self.basis_fidelity = basis_fidelity --> 287 basis = self.basis = TwoQubitWeylDecomposition(gate.to_matrix()) 288 289 # FIXME: find good tolerances
>
~/anaconda3/lib/python3.7/site-packages/qiskit/quantum_info/synthesis/two_qubit_decompose.py in init(self, unitary_matrix) 169 # D, P = la.eig(M2) # this can fail for certain kinds of degeneracy 170 for i in range(100): # FIXME: this randomized algorithm is horrendous --> 171 state = np.random.defaultrng(i) 172 M2real = state.normal()M2.real + state.normal()M2.imag 173 , P = la.eigh(M2real)
>
AttributeError: module 'numpy.random' has no attribute 'default_rng'```
@Anonymous Please help @Anonymous Asfaw @Anonymous V @Anonymous Schmitt @Anonymous @Anonymous Co @Anonymous @Anonymous @Anonymous
Avatar
Anonymous 20-Jul-20 04:16 PM
@Anonymous But the parameters should be indices I think
@Anonymous you be correct Mr. I think I misread the doc a bit. Perhaps the most elegant way is to write two measure statements depending on what you think is elegant though
👍 1
@Anonymous Please help @Anonymous Asfaw @Anonymous V @Anonymous Schmitt @Anonymous @Anonymous Co @Anonymous @Anonymous @Anonymous
@Anonymous https://github.com/aleju/imgaug/issues/537 Tried this?
the imgaug raise AttributeError: module 'numpy.random' has no attribute 'bit_generator' ? i don't know what errors is? can you help me,thank you
Avatar
Anonymous 20-Jul-20 04:17 PM
@Anonymous I did. Is there another way to initialize just the single qubit instead of the full tripartite state?
Avatar
Anonymous 20-Jul-20 04:18 PM
Don't post a screenshot of the solver problem! You might spoil the fun of other students trying to solve the lab by themselves! (At least, mark such messages as spoiler if you feel like you must post)!
👍 1
Avatar
Anonymous 20-Jul-20 04:19 PM
@Anonymous It has been mentioned over there that change the file in which that particular reference has been written but it's actual triggerred in the qiskit lib file
the imgaug raise AttributeError: module 'numpy.random' has no attribute 'bit_generator' ? i don't know what errors is? can you help me,thank you
Avatar
Anonymous 20-Jul-20 04:21 PM
@Anonymous McGaha I used Ry gate for the initialize. And It works! (edited)
Avatar
Anonymous 20-Jul-20 04:22 PM
@Anonymous Did you solve the problem? I figured out mine.
Avatar
Anonymous 20-Jul-20 04:23 PM
@Anonymous I didn't, could you please tell me?
Avatar
Anonymous 20-Jul-20 04:23 PM
Just had a tiny doubt regarding the qsphere representation. See when you have to display (lets say |001>, |010>, |100>) on a latitude how do we arrange them on the latitude?
Let without labelling how can we know the state?
Avatar
Anonymous 20-Jul-20 04:23 PM
@Anonymous I did. Is there another way to initialize just the single qubit instead of the full tripartite state?
@Anonymous McGaha in the initialize function, try using only the index (and the parameters) of the qubit you actually want to set the values for
Avatar
Anonymous 20-Jul-20 04:23 PM
@Anonymous It has been mentioned over there that change the file in which that particular reference has been written but it's actual triggerred in the qiskit lib file
@Anonymous Did you try updating qiskit then?
Avatar
Anonymous 20-Jul-20 04:23 PM
qiskit==0.19.0 qiskit-aer==0.5.1 qiskit-aqua==0.7.0 qiskit-ibmq-provider==0.7.0 qiskit-ignis==0.3.0 qiskit-terra==0.14.0
these are the qiskit versions
qiskit==0.19.0 qiskit-aer==0.5.1 qiskit-aqua==0.7.0 qiskit-ibmq-provider==0.7.0 qiskit-ignis==0.3.0 qiskit-terra==0.14.0
@Anonymous @Anonymous
Avatar
Anonymous 20-Jul-20 04:24 PM
@Anonymous Okay I'll give it a shot. Thank you.
Avatar
Anonymous 20-Jul-20 04:26 PM
@Anonymous @Anonymous
@Anonymous I am on 0.19.6 seems to be working fine with me. Digged a little deeper with that issue seems like the problem is with numpy 1.17. If you do pip install -U qiskit and go to 0.19.6 that might upgrade numpy along and solve the problem?
Avatar
Anonymous 20-Jul-20 04:26 PM
I´m using Python 3 and I´m working in jupyter, when I try to import qiskit the following error is showed: --------------------------------------------------------------------------- AttributeError...
Avatar
Anonymous 20-Jul-20 04:28 PM
@Anonymous I didn't, could you please tell me?
@Anonymous I did a mistake when I initialize parameters. I used [np.sqrt(0.70), np.sqrt(0.30)] and it worked. I am not sure if you have the same problem.
Avatar
Anonymous 20-Jul-20 04:29 PM
@Anonymous Don't they give you the same AttributeError at the end of the day? I mean, it can't hurt to upgrade right..
I´m using Python 3 and I´m working in jupyter, when I try to import qiskit the following error is showed: --------------------------------------------------------------------------- AttributeError...
Avatar
Anonymous 20-Jul-20 04:29 PM
@Anonymous I am on 0.19.6 seems to be working fine with me. Digged a little deeper with that issue seems like the problem is with numpy 1.17. If you do pip install -U qiskit and go to 0.19.6 that might upgrade numpy along and solve the problem?
@Anonymous Same error after upgrading to 0.19.6
Avatar
Anonymous 20-Jul-20 04:30 PM
@Anonymous Same error after upgrading to 0.19.6
@Anonymous Is your numpy version 1.18?
Avatar
Anonymous 20-Jul-20 04:30 PM
0.19.0
Avatar
Anonymous 20-Jul-20 04:31 PM
0.19.0
@Anonymous DMed
Avatar
Anonymous 20-Jul-20 04:33 PM
Other than using if_c() is there any other way to do conditions?
I'm just curious
Avatar
Anonymous 20-Jul-20 04:33 PM
@Anonymous That worked! Thank you! 👍
Avatar
Anonymous 20-Jul-20 04:33 PM
wait the labs are all due on the 31st right?
Avatar
Anonymous 20-Jul-20 04:33 PM
I think it should be c_if() instead of if_c()
I could be wrong
Avatar
Anonymous 20-Jul-20 04:34 PM
Sorry, that. Did people use any other ways other than c_if()
I think it should be c_if() instead of if_c()
@Anonymous
Avatar
Anonymous 20-Jul-20 04:36 PM
Is there a way to do the lab exercise on IBM online jupyter notebook, I cannot install qiskit.aer and qiskit.ibm.provider
Avatar
Anonymous 20-Jul-20 04:37 PM
@Anonymous I have measured two qubits in the same command.
Avatar
Anonymous 20-Jul-20 04:37 PM
Google IBM Experience @Anonymous (edited)
Avatar
Anonymous 20-Jul-20 04:38 PM
Yah but you cannot run the grading there @Anonymous
Avatar
Anonymous 20-Jul-20 04:39 PM
Is there a way to do the lab exercise on IBM online jupyter notebook, I cannot install qiskit.aer and qiskit.ibm.provider
@Anonymous you can upload the entire folder in Google Colab and try!
Avatar
Anonymous 20-Jul-20 04:39 PM
@Anonymous I have measured two qubits in the same command.
@Anonymous great how did you do it? Care to share?
Avatar
Anonymous 20-Jul-20 04:40 PM
measure([q1, q2], [c1, c2])
Avatar
Anonymous 20-Jul-20 04:40 PM
@Anonymous what @Anonymous said
Avatar
Anonymous 20-Jul-20 04:40 PM
I thought the bell measurement was supposed to be a hadamard gate followed by a controlled-x gate, but the correct solution for the bell measurement is a controlled-x gate followed by a hadamard gate. Why is this the case?
Avatar
Anonymous 20-Jul-20 04:41 PM
measure([q1, q2], [c1, c2])
@Anonymous
@Anonymous what @Anonymous said
@Anonymous I see. not to be picky or an a** though, I was hoping for the API to give a more elegant way to put it. But I will be ok with this and two lines (edited)
Avatar
Anonymous 20-Jul-20 04:41 PM
guys, whats is wrong in my entanglement?
Avatar
Anonymous 20-Jul-20 04:41 PM
I thought the bell measurement was supposed to be a hadamard gate followed by a controlled-x gate, but the correct solution for the bell measurement is a controlled-x gate followed by a hadamard gate. Why is this the case?
@Anonymous Creating the Bell state is the H first then CX, but measuring it is the other way around
👍 3
Avatar
Anonymous 20-Jul-20 04:42 PM
@Anonymous Ahh I see where I misunderstood in the intro code. Thank you!
👍 1
Avatar
Anonymous 20-Jul-20 04:45 PM
@Anonymous measurements are always in Z basis so you have to propagate them backwards to the correct basis. I hope it gives you an idea for any other measurement that is not in a compute basis
👍 1
Avatar
Anonymous 20-Jul-20 04:46 PM
you can dm me
Avatar
Anonymous 20-Jul-20 04:46 PM
i'm sorry
Avatar
Anonymous 20-Jul-20 04:46 PM
lol youre good
Avatar
Anonymous 20-Jul-20 04:47 PM
DM a mentor, a friend, post it as spoiler (:
Avatar
Anonymous 20-Jul-20 04:47 PM
@Anonymous measurements are always in Z basis so you have to propagate them backwards to the correct basis. I hope it gives you an idea for any other measurement that is not in a compute basis
@Anonymous that makes more sense, thanks!
to submit the labs, all we have to do is run the final cell right? we don’t need to upload the notebook anywhere?
👍 2
Avatar
Anonymous 20-Jul-20 04:53 PM
Also make sure you fill in your name and email @Anonymous
👍 1
Avatar
Anonymous 20-Jul-20 05:07 PM
What is a bell state?
Avatar
Anonymous 20-Jul-20 05:08 PM
ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'grading_tools/requirements.txt'
Can someone help me with this?
Avatar
Anonymous 20-Jul-20 05:08 PM
guys what do i do if i cant install the files because ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'grading_tools/requirements.txt'
i have the same problem
Avatar
Anonymous 20-Jul-20 05:09 PM
ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'grading_tools/requirements.txt'
@Anonymous did you unzip every thing from lab1.zip?
Avatar
Anonymous 20-Jul-20 05:09 PM
i extracted the entire lab1 folder
Avatar
Anonymous 20-Jul-20 05:09 PM
just follow the steps as shown below (if using ubuntu 16.04+): conda create -n Qiksit python=3.6 conda activate Qiksit pip install qiskit ipykernel python -m ipykernel install --user --name Qiskit nohup jupyter lab & (assuming you have jupyter installed, else please install jupyter as well via pip) mkdir -p Qiskit/day1 cd Qiskit/day1 wget https://cdn.discordapp.com/attachments/729709899260362832/734818743271817317/lab1.zip unzip lab1.zip You can then go to http://127.0.0.1:8888/lab? and browse to your folder and open the ex1.ipynb notebook Select the kernel "Qiskit" for your notebook Run the cells one by one (edited)
👍 1
Avatar
Anonymous 20-Jul-20 05:09 PM
@Anonymous did you unzip every thing from lab1.zip?
@Anonymous Yes (edited)
Avatar
Anonymous 20-Jul-20 05:11 PM
I have a question about the final measurement step. Is it accurate that quantumcircuit.measure([qubit1, qubit2], [cbit1, cbit2]) only works where qubit1, etc are indices? Meaning, if you had a qbit1 object instead, you should directly pass it, instead of inside a list structure?
👍 1
Avatar
Anonymous 20-Jul-20 05:12 PM
@Anonymous you can read about what a Bell state is here: https://qiskit.org/textbook/ch-gates/multiple-qubits-entangled-states.html
A university quantum algorithms/computation course supplement based on Qiskit
Avatar
Anonymous 20-Jul-20 05:14 PM
@Anonymous Yes
@Anonymous Sen's suggestion should workhttps://discordapp.com/channels/729706617951485954/732633353471393853/734879730435621035 (edited)
Avatar
Anonymous 20-Jul-20 05:16 PM
what if i am not using ubuntu 16.04+
Avatar
Anonymous 20-Jul-20 05:17 PM
Hi! A question, when projecting new_sv on sv in the first circuit we use state_fidelity (sv, new_sv) but in the second circuit, the one with the X gate we use state_fidelity (new_sv, sv) for the same projection. Is the order irrelevnt or am I confusing the projections? Hope you're having fun!
Avatar
Anonymous 20-Jul-20 05:20 PM
@Anonymous you should be able to use the list structure as well.
Q = QuantumRegister(2) C = ClassicalRegister(2) qc = QuantumCircuit(Q,C) qc.measure(range(2), range(2)) qc.draw()
Avatar
Anonymous 20-Jul-20 05:21 PM
@Anonymous State fidelity for pure states can be thought of as the squared dot product of two vectors. I think the convention is to project state1 onto state2, but mathematically it should not make a difference. Good point! (edited)
Avatar
Anonymous 20-Jul-20 05:22 PM
I have a question about the final measurement step. Is it accurate that quantumcircuit.measure([qubit1, qubit2], [cbit1, cbit2]) only works where qubit1, etc are indices? Meaning, if you had a qbit1 object instead, you should directly pass it, instead of inside a list structure?
@Anonymous https://qiskit.org/documentation/_modules/qiskit/circuit/quantumcircuit.html#QuantumCircuit If you dig a little bit into the source code, you should see that they can sometimes be passed in as lists (edited)
Avatar
Anonymous 20-Jul-20 05:22 PM
@Anonymous is it resolved? i'm still stuck
Avatar
Anonymous 20-Jul-20 05:22 PM
same
it still shows the same error for me
@Anonymous
Avatar
Anonymous 20-Jul-20 05:23 PM
I can't even start the lab homework. Aer cannot be installed and there's an error since when I try to run the first cell !pip install ....
Avatar
Anonymous 20-Jul-20 05:23 PM
Run pip install in the anaconda prompt
Avatar
Anonymous 20-Jul-20 05:24 PM
I've followed all of the guidelines...
Avatar
Anonymous 20-Jul-20 05:24 PM
thanks, i will try that
in anaconda prompt it shows the same error
Avatar
Anonymous 20-Jul-20 05:25 PM
@Anonymous @Anonymous Kang Hmm, that's what I tried initially, but I got a type error. Here's a sanitized example:
C1 = ClassicalRegister(1) C2 = ClassicalRegister(1) Q = QuantumRegister(2) mycircuit.measure( [ Q[0], Q[1] ], [C1, C2] )
(edited)
Avatar
Anonymous 20-Jul-20 05:25 PM
same
@Anonymous @Anonymous what is the relative position of grading_tools to your ex1.ipynb file?
Avatar
Anonymous 20-Jul-20 05:25 PM
it is in the same folder
lab1
Avatar
Anonymous 20-Jul-20 05:26 PM
@Anonymous @Anonymous Kang Hmm, that's what I tried initially, but I got a type error. Here's a sanitized example: ''' C1 = ClassicalRegister(1) C2 = ClassicalRegister(1) Q = ClassicalRegister(2)
>
mycircuit.measure( [ Q[0], Q[1] ], [C1, C2] ) '
@Anonymous should pass Classicalbits instead of classical registers
Avatar
Anonymous 20-Jul-20 05:26 PM
yup, same folder
Avatar
Anonymous 20-Jul-20 05:26 PM
it is in the same folder
@Anonymous you did check everything is in there? requreiments.txt and such
Avatar
Anonymous 20-Jul-20 05:27 PM
yes
Avatar
Anonymous 20-Jul-20 05:27 PM
yep
requirements.txt is under grading tools
i never changed the files
👍 1
Avatar
Anonymous 20-Jul-20 05:27 PM
yep
@Anonymous you cded inot the lab1 file ?
Avatar
Anonymous 20-Jul-20 05:27 PM
Ah, yes that makes sense @Anonymous Does that mean there should be a modification to the main code, to pass
bell_meas_Alice_qubits(mycircuit, all_qubits_Alice[0], all_qubits_Alice[1], creg1_Alice[0], creg2_Alice[0])
rather than
bell_meas_Alice_qubits(mycircuit, all_qubits_Alice[0], all_qubits_Alice[1], creg1_Alice, creg2_Alice)
?
Avatar
Anonymous 20-Jul-20 05:27 PM
Avatar
Anonymous 20-Jul-20 05:28 PM
entanglement meant applying H and CNOT ?
Avatar
Anonymous 20-Jul-20 05:28 PM
yeah
this really helped me
Quantum teleportation is all over the news and media nowadays. Let’s find out what it really is and how to program a quantum teleportation circuit in Qiskit. Your formal invite to weekly Qiskit videos ► https://ibm.biz/q-subscribe ----- Getting Started – https://ibm.biz/qiskit...
👍 1
I think it was listed in the notebook
Avatar
Anonymous 20-Jul-20 05:28 PM
Ah, yes that makes sense @Anonymous Does that mean there should be a modification to the main code, to pass
>
bell_meas_Alice_qubits(mycircuit, all_qubits_Alice[0], all_qubits_Alice[1], creg1_Alice[0], creg2_Alice[0])
>
rather than
bell_meas_Alice_qubits(mycircuit, all_qubits_Alice[0], all_qubits_Alice[1], creg1_Alice, creg2_Alice)
?
@Anonymous should not change their code, in your function definition, you should replace creg1_Alice with creg1_Alice[0] since register is just a list of bits I believe, don't forget about the creg2
👍 1
Avatar
Anonymous 20-Jul-20 05:29 PM
Hello guys, is lab assigment hard? I still could not start. I am afraid to start.
Avatar
Anonymous 20-Jul-20 05:29 PM
@Anonymous you need to put the index on the classical registers, C1 and C2.
mycircuit.measure( [ Q[0], Q[1] ], [C1[0], C2[0]] )
Avatar
Anonymous 20-Jul-20 05:30 PM
It’s not too bad
Avatar
Anonymous 20-Jul-20 05:30 PM
Hello guys, is lab assigment hard? I still could not start. I am afraid to start.
@Anonymous it can't hurt if you start right?
Avatar
Anonymous 20-Jul-20 05:31 PM
@Anonymous you need to put the index on the classical registers, C1 and C2.
mycircuit.measure( [ Q[0], Q[1] ], [C1[0], C2[0]] )
@Anonymous Kang You don't need to put the indices for the q since they are passed in as indices
Avatar
Anonymous 20-Jul-20 05:31 PM
@Anonymous Yep, I agree with you! I do think the naming is a bit confusing, since the function
bell_meas_Alice_qubits()
seems to take in qubits and clbits rather than qregisters and cregisters, but overall this makes sense 🙂 Thanks for all of the help!
👍 1
Avatar
Anonymous 20-Jul-20 05:31 PM
@Anonymous it can't hurt if you start right?
@Anonymous Yeah, you are right. But I am afraid what If I cannot do.
Avatar
Anonymous 20-Jul-20 05:31 PM
@Anonymous @Anonymous just fixed it, thanks for the help
Avatar
Anonymous 20-Jul-20 05:31 PM
Also, I did want to thank the IBM team for making this notebook - it is a very nice lab tutorial with good interactivity. Great stuff!
Avatar
Anonymous 20-Jul-20 05:32 PM
@Anonymous Yeah, you are right. But I am afraid what If I cannot do.
@Anonymous come here and ask for help, if feels bad, eat some donuts? helped me when I was worse
@Anonymous @Anonymous just fixed it, thanks for the help
@Anonymous care to share what's wrong? I am curious
Avatar
Anonymous 20-Jul-20 05:32 PM
Please is the etanglement is when we apply H and CNOT or it is Bell measurement
Avatar
Anonymous 20-Jul-20 05:33 PM
@Anonymous when you start the jupyter notebook in anaconda prompt you should've dragged in the entire folder instead of the ex1.ipynb itself
👍 1
i started another file in jupyter notebook and it works
Avatar
Anonymous 20-Jul-20 05:33 PM
@Anonymous come here and ask for help, if feels bad, eat some donuts? helped me when I was worse
@Anonymous many thanks for the motivation. I will start right away.
Avatar
Anonymous 20-Jul-20 05:33 PM
@Anonymous when you start the jupyter notebook in anaconda prompt you should've dragged in the entire folder instead of the ex1.ipynb itself
@Anonymous thanks a lottt
Avatar
Anonymous 20-Jul-20 05:33 PM
try it, does it work
Avatar
Anonymous 20-Jul-20 05:34 PM
Guys, does anyone else have a problem with qiskit-aer installation?
Avatar
Anonymous 20-Jul-20 05:34 PM
I do^
Avatar
Anonymous 20-Jul-20 05:34 PM
Guys, does anyone else have a problem with qiskit-aer installation?
@Anonymous care to share error msg?
Avatar
Anonymous 20-Jul-20 05:34 PM
Try to run pip install qiskit in the prompt, this will give you all the latest qiskit packages (edited)
Avatar
Anonymous 20-Jul-20 05:34 PM
I updated all the versions of conda and qiskit but still i'm getting an error in running the notebook
Avatar
Anonymous 20-Jul-20 05:35 PM
Send error msg
Avatar
Anonymous 20-Jul-20 05:35 PM
I updated all the versions of conda and qiskit but still i'm getting an error in running the notebook
@Anonymous quit the notebook and restart your terminal? and restart everything? turn it off and turn if back on sometimes helps when you upgrade something in the middle but the "system" does not know everything you did to correct the mistake (edited)
Avatar
Anonymous 20-Jul-20 05:37 PM
It says Aer is unrecognized
@Anonymous quit the notebook and restart your terminal? and restart everything? turn it off and turn if back on sometimes helps when you upgrade something in the middle but the "system" does not know everything you did to correct the mistake
@Anonymous Yes I did restart the terminal multiple times after the update
but to no avail
previously I had the outdated version of numpy error, but now this
Avatar
Anonymous 20-Jul-20 05:41 PM
@Anonymous Yep, I agree with you! I do think the naming is a bit confusing, since the function
bell_meas_Alice_qubits()
seems to take in qubits and clbits rather than qregisters and cregisters, but overall this makes sense 🙂 Thanks for all of the help!
@Anonymous I have a similar problem to you. Measuring can be done by specifying qubit and classical bit indices or lists of such indices e.g. given_circuit.measure([0, 1], [0, 1]). Alternatively, we can do it by the following lines of code given_circuit.measure([qubit1_Alice, qubit2_Alice], [clbit1_Alice[0], clbit2_Alice[0]]) or by given_circuit.measure(qubit1_Alice, clbit1_Alice) given_circuit.measure(qubit2_Alice, clbit2_Alice) I'm not sure what exactly is going on in each case. The last option passes a qubit and a classical register instead of a qubit and a classical bit so it's a bit odd that it works. However lists of qubits and classical registers don't! (edited)
Avatar
Anonymous 20-Jul-20 05:42 PM
Error: failed building wheel for quiskit-aer Failed to build qiskit-aer
Avatar
Anonymous 20-Jul-20 05:43 PM
It says Aer is unrecognized
@Anonymous I'd really appreciate some help on this
Avatar
Anonymous 20-Jul-20 05:43 PM
I am having the same error about faliing to build the wheel for quiskit-aer, everything else installed correctly. I'm not using anaconda and am on windows 10
Avatar
Anonymous 20-Jul-20 05:46 PM
If you're using python 3.8, it won't work (I'm not sure about 3.7). I don't use Anaconda and am using Python 3.6 (pip)
Avatar
Anonymous 20-Jul-20 05:46 PM
You should probably use 3.7
Avatar
Anonymous 20-Jul-20 05:46 PM
The Bell states, a concept in quantum information science, are specific quantum states of two qubits that represent the simplest (and maximal) examples of quantum entanglement. The Bell states are a form of entangled and normalized basis vectors. This normalization implies tha...
Avatar
Anonymous 20-Jul-20 05:46 PM
3.8 is too new and 3.6 might be too old
Avatar
Anonymous 20-Jul-20 05:47 PM
Go through the teleporation Section @Anonymous
The Bell states, a concept in quantum information science, are specific quantum states of two qubits that represent the simplest (and maximal) examples of quantum entanglement. The Bell states are a form of entangled and normalized basis vectors. This normalization implies tha...
Avatar
Anonymous 20-Jul-20 05:47 PM
3.8 is too new and 3.6 might be too old
@Anonymous it works fine in 3.6. I created an environment in python3.6 (edited)
Avatar
Anonymous 20-Jul-20 05:47 PM
oh ok
Avatar
Anonymous 20-Jul-20 05:47 PM
@Anonymous I'd really appreciate some help on this
@Anonymous firstly, that is not everything about the error is it?Can we have a little more what's below that? Secondly, Windows is a dangerous territory
Avatar
Anonymous 20-Jul-20 05:48 PM
yep, go for anaconda if you are on windows
👍 1
Avatar
Anonymous 20-Jul-20 05:48 PM
This
yep, go for anaconda if you are on windows
@Anonymous Yes, I am on anaconda
Avatar
Anonymous 20-Jul-20 05:49 PM
install anaconda and in the prompt do pip install qiskit and pip install numpy
that will update and install the latest version of qiskit and numpy
Avatar
Anonymous 20-Jul-20 05:49 PM
finally done
Avatar
Anonymous 20-Jul-20 05:49 PM
and close and restart your notebook
Avatar
Anonymous 20-Jul-20 05:50 PM
Please I kindly need assistance. I am stucked
Avatar
Anonymous 20-Jul-20 05:52 PM
Hi, I'm having an issue with the grading cell. Was there a definition line I was supposed to add, or is that imported as part of grade? NameError: name 'answer' is not defined
Avatar
Anonymous 20-Jul-20 05:52 PM
@Anonymous I have a similar problem to you. Measuring can be done by specifying register indices or lists of register indices e.g.
>
given_circuit.measure([0, 1], [0, 1]).
>
Alternatively, we can do it by the following lines of code
>
given_circuit.measure([qubit1_Alice, qubit2_Alice], [clbit1_Alice[0], clbit2_Alice[0]])
>
or by given_circuit.measure(qubit1_Alice, clbit1_Alice) given_circuit.measure(qubit2_Alice, clbit2_Alice)
>
I'm not sure what exactly is going on in each case. The last option passes a qubit and a classical register instead of a qubit and a classical bit so it's a bit odd that it works. However lists of qubits and classical registers don't!
@Anonymous Not sure if I remember about all the details in the source code correctly, but lists of qubits and list of classical registers don't work logically right? In a sense you are comparing apples to oranges. In order for the measurement to work, we will need equal amount of qubits and bits. So the logical way of thinking is I have the same amout of quantum registers and classical registers that should give me the same amount of bits and qubits. If you
Hi, I'm having an issue with the grading cell. Was there a definition line I was supposed to add, or is that imported as part of grade?
>
NameError: name 'answer' is not defined
@Anonymous Burks did you evaluate the cell immediately above the last one? answer is defined there (edited)
Avatar
Anonymous 20-Jul-20 05:55 PM
@Anonymous Burks did you evaluate the cell immediately above the last one?
@Anonymous Wait, I was troubleshooting and had commented out the answer line. Problem solved.
👍 1
Avatar
Anonymous 20-Jul-20 05:56 PM
Please I kindly need assistance. I am stucked
@Anonymous Attuabea did you try what your error message suggested pip install matplotib?
Avatar
Anonymous 20-Jul-20 05:58 PM
@Anonymous yes please I did
Avatar
Anonymous 20-Jul-20 05:59 PM
@Anonymous Not sure if I remember about all the details in the source code correctly, but lists of qubits and list of classical registers don't work logically right?
Yep, just curious why given_circuit.measure(qubit1_Alice, clbit1_Alice) does work. It has a qubit and a classical register which I thought is also apples to oranges but it somehow works nevertheless (edited)
Avatar
Anonymous 20-Jul-20 06:00 PM
@Anonymous yes please I did
@Anonymous Attuabea I had the same problem, it is something to do with environments when using jupyter notebooks. As a quick fix I just installed seaborn to my base python interpreter by running pip install seaborn from a fresh terminal, not jupyter notebook.
👍 1
Avatar
Anonymous 20-Jul-20 06:01 PM
after getting the "correct" message, does it mean my work is completely done and submitted?
👍 1
Avatar
Anonymous 20-Jul-20 06:01 PM
Yep, just curious why given_circuit.measure(qubit1_Alice, clbit1_Alice) does work. It has a qubit and a classical register which I thought is also apples to oranges but it somehow works nevertheless
@Anonymous I think that might be because our classical register is a one bit register? Not sure if the logic is sound though
👍 1
Avatar
Anonymous 20-Jul-20 06:01 PM
after getting the "correct" message, does it mean my work is completely done and submitted?
@Anonymous Yep
👍 1
@Anonymous I think that might be because our classical register is a one bit register? Not sure if the logic is sound though
@Anonymous The classical bit is passed in as a register so you need to specify the bit
Avatar
Anonymous 20-Jul-20 06:06 PM
@Anonymous The classical bit is passed in as a register so you need to specify the bit
@Anonymous but i thought he is indicating that if you do qc.meausre(qubit1,creg) if should work fine?
Avatar
Anonymous 20-Jul-20 06:06 PM
Oh I misread
Avatar
Anonymous 20-Jul-20 06:10 PM
Check this out if you want to visualize Quantum gates https://quantum-computing.ibm.com/docs/circ-comp/q-gates#x-gate
Learning, how-to, and reference materials for IBM Quantum Experience.
Avatar
Anonymous 20-Jul-20 06:12 PM
Once it says I did it well, the grade is automatically summitted right? I don't have to send anything?
Avatar
Anonymous 20-Jul-20 06:13 PM
Once it says I did it well, the grade is automatically summitted right? I don't have to send anything?
@Anonymous Correct
Avatar
Anonymous 20-Jul-20 06:14 PM
https://github.com/Qiskit/qiskit-terra/blob/master/qiskit/circuit/measure.py @Anonymous @Anonymous not sure how to summarize, but looks like they will compare the size of qubits and bits and then make them into lists before doing measurements. That's why the werid qc.measure(qubit, creg) can work when creg is only len 1
Terra provides the foundations for Qiskit. It allows the user to write quantum circuits easily, and takes care of the constraints of real hardware. - Qiskit/qiskit-terra
👍 2
Avatar
Anonymous 20-Jul-20 06:16 PM
hmm interesing
Avatar
Anonymous 20-Jul-20 06:18 PM
hello, is anyone tried to solve the ungraded exercise? I do not know what to do?
Avatar
Anonymous 20-Jul-20 06:19 PM
@Anonymous firstly, that is not everything about the error is it?Can we have a little more what's below that? Secondly, Windows is a dangerous territory
@Anonymous some more details
This error is still in 3.6 version of Python
Avatar
Anonymous 20-Jul-20 06:20 PM
It was a good exercise. Setting up did take a lot of my time. Good night it's 3:50AM here
Avatar
Anonymous 20-Jul-20 06:20 PM
It was a good exercise. Setting up did take a lot of my time. Good night it's 3:50AM here
@Anonymous Goodnight
hello, is anyone tried to solve the ungraded exercise? I do not know what to do?
@Anonymous They are very similar to the exercise right above them
Avatar
Anonymous 20-Jul-20 06:27 PM
@Anonymous They are very similar to the exercise right above them
@Anonymous Well, I have no idea about how to do it? 😢
Avatar
Anonymous 20-Jul-20 06:28 PM
Just change the parameter for sv = Statevector.from_label('00')
Avatar
Anonymous 20-Jul-20 06:28 PM
for anyone who're having troubles with their qiskit installation, here's what i did on my windows machine: - use conda create -n name_of_my_env python=3.6 instead of python=3 (which is the official instruction on https://qiskit.org/documentation/install.html ); using python=3 will install the latest python (3.8) and causes many problems - make sure you do pip install qiskit[visualization] instead of pip install qiskit; that solved some matplotlib and seaborn problems i had
Avatar
Anonymous 20-Jul-20 06:32 PM
Just change the parameter for sv = Statevector.from_label('00')
@Anonymous I may sound stupid but, I am a tyro. May I ask how to do change it? sorry for taking your time, but I really appreciate it.
Avatar
Anonymous 20-Jul-20 06:33 PM
Remember the four bell states from the lecture, phi00, phi01, phi10, phi11
and each of their linear combinations
ex: |phi00> := (|00> + |11>) / sqrt(2)
You want to find the other bell states that can be represented as (|01> + |10>) / sqrt(2)
So it's just out of the other three
correction psi not phi
I hope that helps
Avatar
Anonymous 20-Jul-20 06:41 PM
and each of their linear combinations
@Anonymous Thank you very much, thank you. I noted everything on the lecture but, I think I must study harder. there are lots of things to digest. It intimidates me. I appreciate your time and effort.
👍 1
Avatar
Anonymous 20-Jul-20 06:41 PM
Just change the parameter for sv = Statevector.from_label('00')
@Anonymous i applied an X gate on q1 after the controlled-X gate.. did i do something wrong? 😂
Avatar
Anonymous 20-Jul-20 06:42 PM
@Anonymous Thank you very much, thank you. I noted everything on the lecture but, I think I must study harder. there are lots of things to digest. It intimidates me. I appreciate your time and effort.
@Anonymous If you need help with anything else just ask, you can also dm if you want
@Anonymous i applied an X gate on q1 after the controlled-X gate.. did i do something wrong? 😂
@Anonymous ummmmm im not sure you need to apply an x gate, you can send what you have and ill take a look (edited)
Avatar
Anonymous 20-Jul-20 06:43 PM
hello, is anyone tried to solve the ungraded exercise? I do not know what to do?
@Anonymous yes , but im struggle with the grade one
Avatar
Anonymous 20-Jul-20 06:43 PM
@Anonymous yes , but im struggle with the grade one
@Anonymous What are you struggling with?
Avatar
Anonymous 20-Jul-20 06:45 PM
@Anonymous ummmmm im not sure you need to apply an x gate
@Anonymous no i mean i took another approach instead of changing the initial state.. i just added an x gate on q1 after the hadamard + cnot gates
👍 1
Avatar
Anonymous 20-Jul-20 06:46 PM
im getting register not in this circuit'
Avatar
Anonymous 20-Jul-20 06:47 PM
@Anonymous no i mean i took another approach instead of changing the initial state.. i just added an x gate on q1 after the hadamard + cnot gates
@Anonymous oh lol, that could also work since its just a one bit difference
im getting register not in this circuit'
@Anonymous ?
Avatar
Anonymous 20-Jul-20 06:48 PM
Avatar
Anonymous 20-Jul-20 06:48 PM
qc should be given_circuit
qc isn't defined in that function
👍 1
Avatar
Anonymous 20-Jul-20 06:49 PM
Finally the 3.7 version worked for me!
👍 2
Avatar
Anonymous 20-Jul-20 06:52 PM
I Got error
Avatar
Anonymous 20-Jul-20 06:53 PM
@Anonymous you re missing the measure
Avatar
Anonymous 20-Jul-20 06:53 PM
The bell measurement is backward and you need to add measure for the quantum to classical bits
Avatar
Anonymous 20-Jul-20 06:53 PM
I believe you need the measure gates that send 0 or 1 to the classical registers
Avatar
Anonymous 20-Jul-20 06:54 PM
The bell measurement is also backwards
Like your H and CX
Avatar
Anonymous 20-Jul-20 06:55 PM
Just change the parameter for sv = Statevector.from_label('00')
@Anonymous I changed them to '00' to '10' and '01' and saw different alignments on the sphere. I hope I did it correct. Was that what you mean by saying change the parameter?
Avatar
Anonymous 20-Jul-20 06:56 PM
@Anonymous I changed them to '00' to '10' and '01' and saw different alignments on the sphere. I hope I did it correct. Was that what you mean by saying change the parameter?
@Anonymous Yep, but the first one was suppose to be '01' and the second one '11'
'10' gives |00> - |11>
Avatar
Anonymous 20-Jul-20 06:57 PM
i OOh, everything mess up again
Avatar
Anonymous 20-Jul-20 06:58 PM
@Anonymous Yep, but the first one was suppose to be '01' and the second one '11'
@Anonymous yes yes. '11' thank you very much. I was really afraid of typing something new there. I was afraid to try. I appreciate your help.
👍 1
Avatar
Anonymous 20-Jul-20 06:58 PM
I measure in bell_measure and I am getting error
Avatar
Anonymous 20-Jul-20 06:59 PM
I measure in bell_measure and I am getting error
@Anonymous Your h and cx are backwards
And the two measure functions should be (qubit, clbit)
Avatar
Anonymous 20-Jul-20 07:05 PM
I got this one
I suppose I should put CX before H
Avatar
Anonymous 20-Jul-20 07:07 PM
You didn't initialize the qbit, tho> I got this one @Anonymous
Avatar
Anonymous 20-Jul-20 07:08 PM
I did
Avatar
Anonymous 20-Jul-20 07:08 PM
Could anyone help me? I made this but it's wrong and idk why (the bob implementation is not here, but I did it too) (edited)
Avatar
Anonymous 20-Jul-20 07:09 PM
I did
@Anonymous Remember that the coefficient is the square root of the probability of measuring the state in 0 or 1, what you've written is the reciprocal of the coefficient
Could anyone help me? I made this but it's wrong and idk why
@Anonymous Menezes What about the last step of conditionally applying the X and Z gates depending on the measurement outcomes?
Avatar
Anonymous 20-Jul-20 07:12 PM
Here... Idk if it's correct, but I think so
Avatar
Anonymous 20-Jul-20 07:12 PM
@Anonymous Menezes You are missing 'Bob's part'. Print out the classical variable clbit1_Alice and you will see why it's wrong.
Avatar
Anonymous 20-Jul-20 07:12 PM
@Anonymous Menezes I think that you need to use c_if function and not a python if to pass
👍 1
Avatar
Anonymous 20-Jul-20 07:14 PM
@Anonymous
Now this my final graph
but still error
Avatar
Anonymous 20-Jul-20 07:14 PM
@Anonymous OK, do you know the syntax?
Avatar
Anonymous 20-Jul-20 07:15 PM
Now this my final graph
@Anonymous It doesn't look like the qubit got initialized to the vector you wanted, can you show me how you initialized it in your code?
Avatar
Anonymous 20-Jul-20 07:15 PM
@Anonymous Menezes qc.some_gate(qubit).c_if(cbit, 1)
👍 1
Avatar
Anonymous 20-Jul-20 07:16 PM
@Anonymous Menezes what @Anonymous said
Qc is gates_current
Avatar
Anonymous 20-Jul-20 07:16 PM
OK, I'll try it and I'll let you know
Avatar
Anonymous 20-Jul-20 07:16 PM
Avatar
Anonymous 20-Jul-20 07:18 PM
@Anonymous Menezes qc is given_circuit
Avatar
Anonymous 20-Jul-20 07:18 PM
@Anonymous you need to add a line initializing the qubit to that state as well circuit.initialize(state_vector, qubit_index)
Avatar
Anonymous 20-Jul-20 07:20 PM
@Anonymous I should replace def initialize_qubit (...) by circuit.initialize(state_vector, qubit_index)?
Avatar
Anonymous 20-Jul-20 07:20 PM
no, add that line into the definition of initialize_qubit
👍 1
def initialize_qubit(...): desired_vector = [] given_circuit.initialize(desired_vector, qubit_index)
that line let's qiskit know that you want the circuit to initialize the qubit indexed by qubit_index to the desired state vector you pass
👍 1
Avatar
Anonymous 20-Jul-20 07:23 PM
Initialize' object has no attribute 'label'
Avatar
Anonymous 20-Jul-20 07:24 PM
Thank you all!!!
Avatar
Anonymous 20-Jul-20 07:24 PM
Avatar
Anonymous 20-Jul-20 07:24 PM
@Anonymous I was also confused by Initialize class. You need a circuit method initialize
@Anonymous it looks right to me
👍 1
Avatar
Anonymous 20-Jul-20 07:25 PM
can you show the error?
Avatar
Anonymous 20-Jul-20 07:26 PM
Initialize' object has no attribute 'label'
Avatar
Anonymous 20-Jul-20 07:26 PM
a screenshot of the error stack would help more
Avatar
Anonymous 20-Jul-20 07:27 PM
Avatar
Anonymous 20-Jul-20 07:28 PM
@Anonymous your error in the bell measurement function; try removing drawing
👍 1
Avatar
Anonymous 20-Jul-20 07:29 PM
The circuit is back but I got error
Avatar
Anonymous 20-Jul-20 07:31 PM
I think that x is controlled by second register @Anonymous
👍 1
Avatar
Anonymous 20-Jul-20 07:31 PM
I changed the measurement order
it works now
thank you very much
👍 1
Avatar
Anonymous 20-Jul-20 07:42 PM
guys, did you know qiskit before? or have you use it before? Why I cannot solve the graded exercise? I even do not know where to start? Is it too complicated ?
did you study from qiskit textbook?
Avatar
Anonymous 20-Jul-20 07:42 PM
@Anonymous some more details
@Anonymous sudo pip install networkx might solve it. And anaconda is very good stuff
Avatar
Anonymous 20-Jul-20 07:46 PM
@Anonymous idk where to start either
i have no experience with it, just trying to figure it out from the previous boxes
Avatar
Anonymous 20-Jul-20 07:48 PM
@Anonymous @Anonymous try to find a mentor in addition to self study!
Avatar
Anonymous 20-Jul-20 07:49 PM
@Anonymous @Anonymous try to find a mentor in addition to self study!
@Anonymous I am about to cry 😦
Avatar
Anonymous 20-Jul-20 07:50 PM
@Anonymous I am about to cry 😦
@Anonymous nooooo don't cry, you got this 🙂
A university quantum algorithms/computation course supplement based on Qiskit
Avatar
Anonymous 20-Jul-20 07:51 PM
you got this @Anonymous !
Avatar
Anonymous 20-Jul-20 07:51 PM
A university quantum algorithms/computation course supplement based on Qiskit
Avatar
Anonymous 20-Jul-20 07:51 PM
Avatar
Anonymous 20-Jul-20 07:53 PM
can someone explain what this expression means
❤️ 2
what does it mean when the coefficients arent 1/rad2
Avatar
Anonymous 20-Jul-20 07:54 PM
@Anonymous quantum state is described by the probability amplitudes
👍 1
Square them to get probability!
Avatar
Anonymous 20-Jul-20 07:54 PM
it's an state that has 70% of being in zero and 30% of being in one
Avatar
Anonymous 20-Jul-20 07:54 PM
oh ok
Avatar
Anonymous 20-Jul-20 07:54 PM
probability*
Avatar
Anonymous 20-Jul-20 07:54 PM
In this state |0> state will be seen 70% of the time
Avatar
Anonymous 20-Jul-20 07:54 PM
i thought so but why would it be an uneven probability
Avatar
Anonymous 20-Jul-20 07:55 PM
@Anonymous life is not fair!
😆 1
Sometimes coin is not fair!
Avatar
Anonymous 20-Jul-20 07:55 PM
help please i don't know what am doing wrong
Avatar
Anonymous 20-Jul-20 07:55 PM
lol
so the probability is just arbitrary and doesn't affect the entanglement? (edited)
Avatar
Anonymous 20-Jul-20 07:56 PM
you got this @Anonymous !
@Anonymous PN I am serious, I have cried!
Avatar
Anonymous 20-Jul-20 07:57 PM
help please i don't know what am doing wrong
@Anonymous why 1/sqrt(0.3)
Avatar
Anonymous 20-Jul-20 07:59 PM
@Anonymous what is your desired vector?
Avatar
Anonymous 20-Jul-20 08:01 PM
@Anonymous why 1/sqrt(0.3)
@Anonymous thanks i see where i went wrong
👍 1
Avatar
Anonymous 20-Jul-20 08:06 PM
@Anonymous you want to have equal probabilities in order to maximize entanglement but sometimes it is not what we are trying to achieve
Avatar
Anonymous 20-Jul-20 08:11 PM
i am still quite confused but thank you (edited)
Avatar
Anonymous 20-Jul-20 08:12 PM
help please, when I try to run the second cell: from qiskit import QuantumCircuit i get the following error:
Avatar
Anonymous 20-Jul-20 08:14 PM
help please, when I try to run the second cell: from qiskit import QuantumCircuit i get the following error:
@Anonymous upgrade numpy , restart terminal and notebook
Avatar
Anonymous 20-Jul-20 08:16 PM
I did the upgrade, i just needed to restart the terminal, thanks
👍 1
Avatar
Anonymous 20-Jul-20 08:17 PM
Hey, has anyone seen how the notebook is graded and/or if there is anywhere to put in photographed work instead?
I'm on ungraded exercises 1 and 2, don't know what I'm required to show for it
Avatar
Anonymous 20-Jul-20 08:20 PM
Hey, has anyone seen how the notebook is graded and/or if there is anywhere to put in photographed work instead?
@Anonymous It's just the graded part on the bottom (Quantum Teleportation) that is checked
Avatar
Anonymous 20-Jul-20 08:20 PM
Brilliant, thanks! @Anonymous
Avatar
Anonymous 20-Jul-20 08:23 PM
aparently i got the answer wrong i dont know why
Avatar
Anonymous 20-Jul-20 08:24 PM
aparently i got the answer wrong i dont know why
@Anonymous check the measurement
Avatar
Anonymous 20-Jul-20 08:24 PM
aparently i got the answer wrong i dont know why
@Anonymous Check the Bell measurement 🙂
👍 2
Avatar
Anonymous 20-Jul-20 08:25 PM
given_circuit.measure(0,clbit1_Alice) given_circuit.measure(1,clbit2_Alice)
Avatar
Anonymous 20-Jul-20 08:25 PM
Not this measurement....Bell’s measurement circuit
Avatar
Anonymous 20-Jul-20 08:25 PM
given_circuit.measure(0,clbit1_Alice) given_circuit.measure(1,clbit2_Alice)
@Anonymous Before this
Avatar
Anonymous 20-Jul-20 08:26 PM
@Anonymous gates before measurements constitute Bell_measurement not measurements in Z basis that you showed
👍 1
Avatar
Anonymous 20-Jul-20 08:29 PM
aparently i got the answer wrong i dont know why
@Anonymous Your bell measurement is backwards
The H and CX
Avatar
Anonymous 20-Jul-20 08:30 PM
I keep getting the following error:
--------------------------------------------------------------------------- OSError Traceback (most recent call last) <ipython-input-1-dc218eb2262c> in <module> ----> 1 from qiskit import QuantumCircuit 2 3 mycircuit = QuantumCircuit(1) 4 mycircuit.draw('mpl') ~/opt/anaconda3/lib/python3.7/site-packages/qiskit/init.py in <module> 55 # Try to import the Aer provider if installed. 56 try: ---> 57 from qiskit.providers.aer import Aer 58 except ImportError: 59 suppress_warnings = os.environ.get('QISKIT_SUPPRESS_PACKAGING_WARNINGS', '') ~/opt/anaconda3/lib/python3.7/site-packages/qiskit/providers/aer/init.py in <module> 67 from .backends import * 68 from . import pulse ---> 69 from . import noise~/opt/anaconda3/lib/python3.7/subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session) 1520 if errno_num == errno.ENOENT: 1521 err_msg += ': ' + repr(err_filename) -> 1522 raise child_exception_type(errno_num, err_msg, err_filename) 1523 raise child_exception_type(err_msg) 1524 OSError: [Errno 86] Bad CPU type in executable: 'convert' (edited)
Avatar
Anonymous 20-Jul-20 08:32 PM
Check that your qiskit is installed properly
Avatar
Anonymous 20-Jul-20 08:33 PM
It was, then we updated to macOSX 10.15 and i cant find any work arounds,
Avatar
Anonymous 20-Jul-20 08:34 PM
Try restarting your notebook
If that doesn't do anything, you might need to reinstall qiskit
Avatar
Anonymous 20-Jul-20 08:38 PM
I was reading through the deferred measurement principle in the Qiskit textbook. Would this mean that Alice and Bob actually can't be physically apart because of the CZ and CX gates? (edited)
Avatar
Anonymous 20-Jul-20 08:41 PM
@Anonymous CZ and CX are controlled via classical channel
Alice and Bob can be as far apart as the entanglement survives
Classical communication is at speed of light
Avatar
Anonymous 20-Jul-20 08:44 PM
Hmmm, so Alice and Bob part ways after the entangled pair of qubits are created
Avatar
Anonymous 20-Jul-20 08:44 PM
Am getting this error. CircuitError: "Type error handling [ClassicalRegister(1, 'c14'), ClassicalRegister(1, 'c15')] (<class 'list'>)". Can someone help, please? Thank you.
Avatar
Anonymous 20-Jul-20 08:45 PM
@Anonymous entanglement is the resource that you create first and then use it.
Avatar
Anonymous 20-Jul-20 08:45 PM
@Anonymous Pradeep I have no idea about that error
👍 1
Avatar
Anonymous 20-Jul-20 08:45 PM
It is easiest to create it when qubits are close
👍 1
Avatar
Anonymous 20-Jul-20 08:46 PM
Alright guys! I have an question about the ungraded part of the exercise
Avatar
Anonymous 20-Jul-20 08:46 PM
can anyone tell me inner product and dot product are same?
Avatar
Anonymous 20-Jul-20 08:46 PM
Ms. Elisa said that There is no physical difference between (1/sqrt(2))(|01⟩+|10⟩) and (1/sqrt(2))(|01⟩-|10⟩)
@Anonymous R as long as i can see, yes they are the same
So both of the ungraded parts should have the same answer?
Avatar
Anonymous 20-Jul-20 08:47 PM
thanks @Anonymous
i am starting from scratch
since i didnt get it yesterday
Avatar
Anonymous 20-Jul-20 08:48 PM
Iss all good! do you know the answer to my question?
Avatar
Anonymous 20-Jul-20 08:49 PM
@Anonymous i don't know
👍🏻 1
Avatar
Anonymous 20-Jul-20 08:50 PM
@Anonymous I think she might have said for (1/sqrt(2))(-|01⟩+|10⟩) and (1/sqrt(2))(|01⟩-|10⟩) or (1/sqrt(2))(|01⟩+|10⟩) and (1/sqrt(2))(-|01⟩-|10⟩)
👍 2
Avatar
Anonymous 20-Jul-20 08:51 PM
@Anonymous Nice!. Thanks for the text. I gotta go back and check that out again.
Avatar
Anonymous 20-Jul-20 08:52 PM
In the exercise we are initialize a state with 0.7 probability for state 0 and 0.3 propability for state 1... in this exercise it´s no problem to do this...but is it actually possible to prepare aquantum state in such a way that one knows exactlly the probabilities of the two states? so i am asking for the preparation procedure ...because I think it´s not possible....one can just estimate the probability distribution of identical prepared quantum states by many many measurements but never with 1 Probability... Does anyone get my point?😆
Avatar
Anonymous 20-Jul-20 08:52 PM
@Anonymous No worries. Enjoy, learn and have fun
Avatar
Anonymous 20-Jul-20 08:53 PM
The H and CX
@Anonymous perfect, it worked out perfectly
👍 1
Avatar
Anonymous 20-Jul-20 08:58 PM
@Anonymous did you figure out the ungraded portions of the lab
Avatar
Anonymous 20-Jul-20 08:59 PM
@Anonymous did you figure out the ungraded portions of the lab
@Anonymous Yes i did
Avatar
Anonymous 20-Jul-20 08:59 PM
@Anonymous Alright! I have a couple of questions...if you don't mind
Avatar
Anonymous 20-Jul-20 09:00 PM
@Anonymous Alright! I have a couple of questions...if you don't mind
@Anonymous alright
Avatar
Anonymous 20-Jul-20 09:03 PM
In the graded exercise, I think we need to understand how the qubits are initialize and how a bell pair is created ?
In the Ex1, we need to understand the qubits initial state i.e |0> and |1> state works.
Avatar
Anonymous 20-Jul-20 09:04 PM
@Anonymous Great!! okay so following is my understanding of ungraded # 1: we start with creating a state vector ('01'), then we make a QuantumCircuit of 2 qubits. We apply the Hadamard gate to the first one. After that, we apply controlled NOT (from 1 to 0). We plot it to get the horizontal line
Hadamard = H
controlled NOT = CX
Avatar
Anonymous 20-Jul-20 09:07 PM
@Anonymous you can start with 00 state but use X gate to flip the qubit to 1 state
CX and X acting on the same qubit commute!
Avatar
Anonymous 20-Jul-20 09:08 PM
hmm....
Avatar
Anonymous 20-Jul-20 09:08 PM
00 -> X(1) -> 01
Avatar
Anonymous 20-Jul-20 09:08 PM
I see what you saying!
Avatar
Anonymous 20-Jul-20 09:08 PM
And I am counting from 0
00->H(0)->CX(1,0)->X-> 10+01
Avatar
Anonymous 20-Jul-20 09:09 PM
But how would that help. Why not just make 01. My bad if I am being dumb
Avatar
Anonymous 20-Jul-20 09:09 PM
@Anonymous on a real quantum computer everything start with 00
You basically cool the chip down
Avatar
Anonymous 20-Jul-20 09:10 PM
I see! It is good habit to do so.. Thanks @Anonymous
Avatar
Anonymous 20-Jul-20 09:10 PM
And then start applying RF to flip qubits
Avatar
Anonymous 20-Jul-20 09:11 PM
Cool cool! I have done ungraded 1. How do I know if it is right or wrong/ lol
Avatar
Anonymous 20-Jul-20 09:13 PM
@Anonymous If your state variable is sv then sv.data would show you the state or use mycircuit.draw(‘mpl’) to visualize it
Avatar
Anonymous 20-Jul-20 09:13 PM
Oh I see! when you square (1/sqrt(2)) you get 0.5. That is why the probabilities are evenly distributed between 01 and 10
👍 1
@Anonymous Yes I have very close results! Out of 1000 tries, I got 501 and 499, which agrees with the probability density
Thank you
Avatar
Anonymous 20-Jul-20 09:24 PM
Hello everyone, I switched from python 3.8 to 3.7 and things started working. Now, I was looking at some of the commands of qiskit and found something weird. When I start with the state |01> and apply a H_A, it should result in |01> + |11>, but the program is telling me that it is |00> - |01> instead. Instead, if I apply an H_B to |01> it should result in |00> - |01> but the program is telling me that the result is |01> + |11>. Why is it that when I apply H_A, it applyes H_B instead? I'm writing the gate H_A circuit.h(0) and H_B as circuit.h(1). Anyone has any idea?
Avatar
Anonymous 20-Jul-20 09:30 PM
@Anonymous that is weird. How do you create the state to begin with
Avatar
Anonymous 20-Jul-20 09:31 PM
As Statevector.from_label('01')
Avatar
Anonymous 20-Jul-20 09:33 PM
Does anybody know whether we can submit our answers more than once for the labs?
Avatar
Anonymous 20-Jul-20 09:36 PM
@Anonymous yes you can. Only last one counts
@Anonymous I have tried and if you draw your state then you see that label has order in the opposite direction that what you expect
Avatar
Anonymous 20-Jul-20 09:45 PM
does the email in the submission have to be the one you registered with discord or it can be any email address you have?
Avatar
Anonymous 20-Jul-20 09:45 PM
@Anonymous if you look at the source then you see that they do ‘reversed(label)’ when creating qubits. I wonder why
Avatar
Anonymous 20-Jul-20 09:49 PM
Does anyone have any advice on how they figured out how to do the graded section of lab1? Unless I'm just completely not understanding this (which is entirely possible) I don't feel like the lecture or the ungraded part really covered how to do this
Avatar
Anonymous 20-Jul-20 09:52 PM
>
Does anyone have any advice on how they figured out how to do the graded section of lab1? Unless I'm just completely not understanding this (which is entirely possible) I don't feel like the lecture or the ungraded part really covered how to do this @Anonymous Hello, same here! Still trying to figure out how to start the problem. I think, we should study from the qiskit's textbook.
Avatar
Anonymous 20-Jul-20 09:52 PM
@Anonymous if you look at the source then you see that they do ‘reversed(label)’ when creating qubits. I wonder why
@Anonymous Thanks, that is really weird and confusing, but it's good to know that it happens that way.
Avatar
Anonymous 20-Jul-20 09:53 PM
@Anonymous I thus prefer to used X gate to flip qubit myself since it is more physical to start with 00 state
Avatar
Anonymous 20-Jul-20 09:54 PM
In the graded exercise, the first cell initialize: We have to do custom initialize with the given state?
Avatar
Anonymous 20-Jul-20 09:54 PM
@Anonymous yes
State is given
Avatar
Anonymous 20-Jul-20 09:55 PM
@Anonymous From the lecture I understand what we need to do, I just don't know how to actually do it. I'm hoping future lectures/labs cover qiskit a little more.
Avatar
Anonymous 20-Jul-20 09:55 PM
@Anonymous please check qiskit textbook you shall find everything you need
Avatar
Anonymous 20-Jul-20 09:56 PM
@Anonymous @Anonymous google qiskit quantumcircuit initialize. The hint is given in the lab
Initialize_qubit is a one line task
👍 1
Avatar
Anonymous 20-Jul-20 10:00 PM
@Anonymous I thus prefer to used X gate to flip qubit myself since it is more physical to start with 00 state
@Anonymous That's a great tip, thanks!
Avatar
Anonymous 20-Jul-20 10:04 PM
How to verify the ungraded exercise ? I know states are given but still.
Avatar
Anonymous 20-Jul-20 10:05 PM
@Anonymous you can use .data method to see the numbers, do draw(‘mpl’) or run Aer simulator to see counts
QiskitMulti 1
Avatar
Anonymous 20-Jul-20 10:08 PM
@Anonymous you can use .data method to see the numbers, do draw(‘mpl’) or run Aer simulator to see counts
@Anonymous Thanks.
Avatar
Anonymous 20-Jul-20 10:09 PM
Hi, I'm just starting to work through the labs, and this code wouldn't produce an interactive widget when I run it locally:
from resources.qiskit_textbook.widgets import gate_demo gate_demo(qsphere=True)
Is there something I need to add?
Avatar
Anonymous 20-Jul-20 10:11 PM
Hi, I'm just starting to work through the labs, and this code wouldn't produce an interactive widget when I run it locally:
from resources.qiskit_textbook.widgets import gate_demo gate_demo(qsphere=True)
Is there something I need to add?
@Anonymous Gregoire Nothing to add. Are you getting any error ?
Avatar
Anonymous 20-Jul-20 10:12 PM
Yes I'm getting this output when I run it locally
Avatar
Anonymous 20-Jul-20 10:17 PM
@Anonymous Gregoire I saw something similar when the cell was not evaluated. It is not technically an error message but lack of resources to show
Avatar
Anonymous 20-Jul-20 10:18 PM
@Anonymous thanks that what I figured. I remember a similar widget working in an IBM quantum experience notebook but I'm not sure what they used to get it to work
Avatar
Anonymous 20-Jul-20 10:19 PM
@Anonymous Gregoire when I quit the kernel then image disappears
It does not stay without the kernel. I think
Avatar
Anonymous 20-Jul-20 10:21 PM
I never quit the kernel though. It's not too important, thanks for trying
👍 1
Avatar
Anonymous 20-Jul-20 10:28 PM
Can someone tell me is the lab computationally expensive to work on Jupiter in personal pc, do i need to use it in colab?
Or its light?
Avatar
Anonymous 20-Jul-20 10:29 PM
It's very light.
Avatar
Anonymous 20-Jul-20 10:29 PM
@Anonymous ok thanks
Avatar
Anonymous 20-Jul-20 10:43 PM
qubit_Alice.h(1) #q1 given_circuit.draw (output = 'mpl') #q1&q2 given_circuit.cx (0,1) qubit_Alice.h(0) given_circuit.draw(output = 'mpl')
Is this correct way of entangling?
Sorry, I am confused. I appreciate your help.
Avatar
Anonymous 20-Jul-20 10:46 PM
Hmmm, it looks like you are on the right track! It might be useful to draw out what you are doing on paper as you are doing it. For instance, why are you first making the 2nd qubit into a |+> state? And what is the purpose of the last hadamard gate on the 1st qubit?
Avatar
Anonymous 20-Jul-20 10:47 PM
Agreed. The second part of the program is absolutely OK (after line 2)
Avatar
Anonymous 20-Jul-20 10:48 PM
Hmmm, it looks like you are on the right track! It might be useful to draw out what you are doing on paper as you are doing it. For instance, why are you first making the 2nd qubit into a |+> state? And what is the purpose of the last hadamard gate on the 1st qubit?
@Anonymous Ehm, I do not know precisely, I just watched the youtube video. I am not familiar with the subject. Still trying to figure out 😦
Avatar
Anonymous 20-Jul-20 10:50 PM
No worries! We can talk it out with an example. First, let's say that you start off with both qubit1 and qubit2 in the 0 state, which can be represented by |0>|0> (or |00>) Now, you act a Hadamard gate on the second qubit. Remember, a Hadamard gate takes |0> to |+>, where |+> is 1/sqrt(2) (|0> + |1>). So, what state is your overall two qubit system at now?
👍 1
Avatar
Anonymous 20-Jul-20 10:51 PM
No worries! We can talk it out with an example. First, let's say that you start off with both qubit1 and qubit2 in the 0 state, which can be represented by |0>|0> (or |00>)
>
Now, you act a Hadamard gate on the second qubit. Remember, a Hadamard gate takes |0> to |+>, where |+> is 1/sqrt(2) (|0> + |1>). So, what state is your overall two qubit system at now?
@Anonymous I dont know 😢
Avatar
Anonymous 20-Jul-20 10:52 PM
What kind of data type does the "evolve" method of "statevector" class receive??
Avatar
Anonymous 20-Jul-20 10:54 PM
@Anonymous Yun evolve takes in a QuantumCircuit object, and returns a state vector
Avatar
Anonymous 20-Jul-20 10:54 PM
I have a few small questions in #quantum-mechanics-help if anyone knows the answers. They are fairly simple questions.
Avatar
Anonymous 20-Jul-20 10:55 PM
@Anonymous Thank you!
Avatar
Anonymous 20-Jul-20 10:56 PM
@Anonymous (1/sqr(2),1/sqr(2),0,0) Whould this be the overall state?
Avatar
Anonymous 20-Jul-20 11:02 PM
@Anonymous yep, I think you would be right! Another way of representing it would be 1/sqrt(2) ( |00> + |01>)
Avatar
Anonymous 20-Jul-20 11:03 PM
do we have until July 31st for all lab assignments or is due the day after for each assignment?
Avatar
Anonymous 20-Jul-20 11:03 PM
@Anonymous @Anonymous if you then execute your CNOT gate from qubit 1 to qubit 2, you'll find that nothing happens, because qubit 0 is in the 0 state, not the 1 state! So, is there something you can change about the initial hadamard to make the two qubits entangled?
Avatar
Anonymous 20-Jul-20 11:04 PM
@Anonymous until July 31st
Avatar
Anonymous 20-Jul-20 11:04 PM
ok thanks
👍 1
Avatar
Anonymous 20-Jul-20 11:09 PM
>
@Anonymous @Anonymous if you then execute your CNOT gate from qubit 1 to qubit 2, you'll find that nothing happens, because qubit 0 is in the 0 state, not the 1 state! So, is there something you can change about the initial hadamard to make the two qubits entangled? @Anonymous I think I mus study from qiskit's textbook. I cannot do anything, unfortunately...
May be I lack of the fundamentals..
I appreciate your help.
Avatar
Anonymous 20-Jul-20 11:10 PM
@Anonymous so than there needs to be an x gate before the CNOT
Avatar
Anonymous 20-Jul-20 11:13 PM
@Anonymous an x gate on which qubit? You could do that (and I'm sure there is a way!), but an easier method is to act the Hadamard on the first qubit, creating the state 1/sqrt(2) (|00> + |10>) instead.
I'm popping off for now, but best of luck everybody!
Avatar
Anonymous 20-Jul-20 11:15 PM
@Anonymous you the real mvp, solid info thx
Avatar
Anonymous 20-Jul-20 11:16 PM
i'm getting a name error saying that "name 'c1bit2_Alice' is not defined" for the "controlled_ops_Bob_qubit" function...how could i possibly fix this type of name error?
Avatar
Anonymous 20-Jul-20 11:18 PM
The final cell indicates that my answer is correct, does this mean that my answer is automatically submitted? (edited)
@Anonymous did you mistype 'clbit2_Alice' to 'c1bit2_Alice'?
Avatar
Anonymous 20-Jul-20 11:22 PM
@Anonymous Kieu ohhh...yes i did...thank you so much!
@Anonymous Kieu i think so? but i'm not sure...
Avatar
Anonymous BOT 20-Jul-20 11:23 PM
Your hand has been raised! A mentor will drop in as soon as they are available.
Your hand has been raised! A mentor will drop in as soon as they are available.
Avatar
Anonymous 20-Jul-20 11:28 PM
are 2dimentional bra-kets just representations of a specific state? and when squared the probability for that state?
Avatar
Anonymous 20-Jul-20 11:34 PM
so is this a ket-bra plus a ket-bra?
👍 1
Avatar
Anonymous 20-Jul-20 11:35 PM
yes
Avatar
Anonymous 20-Jul-20 11:35 PM
are 2dimentional bra-kets just representations of a specific state? and when squared the probability for that state?
@Anonymous I believe so
the absolute square
Avatar
Anonymous 20-Jul-20 11:36 PM
what is the relationship between x and psi in this case?
Avatar
Anonymous 20-Jul-20 11:36 PM
bra x is being multiplied by ket psi (edited)
x is a row vector and psi is a column vector
so, vector x (times) vector psi
Avatar
Anonymous 20-Jul-20 11:37 PM
I do understand the computation but the semantics behind it are not clear to me!
what do x and psi represent here semantically?
Avatar
Anonymous 20-Jul-20 11:38 PM
me neither, but I can assume we will only understand more with time and as the lectures go on.
Avatar
Anonymous 20-Jul-20 11:38 PM
I think it wont get easier
Avatar
Anonymous 20-Jul-20 11:38 PM
hmmm, im not sure what it represents (edited)
ok nevermind
the state is |x>
and the rest just seems to be part of the formula which returns probability
do you have the pdf lecture notes? they are very usefull
Avatar
Anonymous 20-Jul-20 11:40 PM
psi should be the representation of the superposition the qubit i gues
Avatar
Anonymous 20-Jul-20 11:40 PM
Im sorry what was the superposition?
Avatar
Anonymous 20-Jul-20 11:40 PM
I'm having this error, and I don't understand what it means or what it's trying to tell me. Anybody has any idea?
Avatar
Anonymous 20-Jul-20 11:40 PM
I know it is when a qubit is in both states i belive, but when do we have superposition?
Avatar
Anonymous 20-Jul-20 11:41 PM
I think every qubit is in superposition until you measure it
Avatar
Anonymous 20-Jul-20 11:41 PM
ok
Avatar
Anonymous 20-Jul-20 11:42 PM
and the ket shows you the probability for eiser x or xorthogonal
Avatar
Anonymous 20-Jul-20 11:42 PM
eiser?
Avatar
Anonymous 20-Jul-20 11:42 PM
either*
Avatar
Anonymous 20-Jul-20 11:42 PM
oh ok xD srry
Avatar
Anonymous 20-Jul-20 11:43 PM
sorry im on this for 15hours now
Avatar
Anonymous 20-Jul-20 11:43 PM
me too ive been on this since the morning its ok
we will do it
Avatar
Anonymous 20-Jul-20 11:43 PM
inshallah
oh
Avatar
Anonymous 20-Jul-20 11:44 PM
I know you can create superposition with the hamarad gate
Avatar
Anonymous 20-Jul-20 11:44 PM
yes true I remember
Avatar
Anonymous 20-Jul-20 11:45 PM
also, do you know what the symbolls i asked about in #quantum-mechanics-help mean?
Avatar
Anonymous 20-Jul-20 11:55 PM
@Anonymous I understand how equal superposition is created, using Hadamard. But what is happening when QuantumCircuit.initialize() is used? What is the gate representatiom of that?
Avatar
Anonymous 20-Jul-20 11:56 PM
I believe that just creates the qubit?
Avatar
Anonymous 20-Jul-20 11:57 PM
yeah to set to either 0 or 1...? Hopefully I'm right
Avatar
Anonymous 20-Jul-20 11:57 PM
Yes either one
I do not know what the lab says to set it to though
i think it just says to apply the gates
Avatar
Anonymous 20-Jul-20 11:58 PM
Alice, q0 has to be the quantum state listed
Bob, q2 just 0?
Avatar
Anonymous 20-Jul-20 11:59 PM
What does the QuantumCircut() method do?
Avatar
Anonymous 21-Jul-20 12:00 AM
me neither, but I can assume we will only understand more with time and as the lectures go on.
@Anonymous Majboor @Anonymous You can think of |x> representing a basis state like |0>, and <x|psi> tells how much of x is there in |psi>.
Avatar
Anonymous 21-Jul-20 12:00 AM
the probability of x?
Avatar
Anonymous 21-Jul-20 12:02 AM
The probability of |psi> collapsing to |x> when a measurement is done ( technically the probability density, since I am pretty sure |x> represents a continuous basis here).
Avatar
Anonymous 21-Jul-20 12:03 AM
@Anonymous I understand how equal superposition is created, using Hadamard.
>
But what is happening when QuantumCircuit.initialize() is used? What is the gate representatiom of that?
@Anonymous it just sets up the initial conditions of the circuit. You enter the starting parameters and number of qubits here.
Avatar
Anonymous 21-Jul-20 12:03 AM
Oh wow thats wonderful i understand that
👍 1
wait what in the world why would 𝜙=𝜋? isnt 𝜙 a constant?
Avatar
Anonymous 21-Jul-20 12:05 AM
wait what in the world why would 𝜙=𝜋? isnt 𝜙 a constant?
@Anonymous Majboor No, phi is a variable representing an angle.
Avatar
Anonymous 21-Jul-20 12:07 AM
Oh wow that changes how i read the notes, ok, are these placeholder values like theta?
Avatar
Anonymous 21-Jul-20 12:08 AM
Can't say from the picture. It will depend on the context. If you are following the Qiskit textbook, can you share the link?
Avatar
Anonymous 21-Jul-20 12:09 AM
I was following the lecture notes
But they are most likely in the textbook let me look
Avatar
Anonymous 21-Jul-20 12:10 AM
I was following the lecture notes
@Anonymous Majboor Oh! I didn't realize they had shared lecture notes.
Avatar
Anonymous 21-Jul-20 12:10 AM
oh haha yeah they are super helpful
perahps those can provide the neseccary context?
👍 1
i also found the symbol on the website
Avatar
Anonymous 21-Jul-20 12:15 AM
I'm having this error, and I don't understand what it means or what it's trying to tell me. Anybody has any idea?
Hi @Anonymous . Were you able to solve this issue?
Avatar
Anonymous 21-Jul-20 12:16 AM
Hi @Anonymous . Were you able to solve this issue?
@Anonymous SAPV Yes, It seems the code provided on the lab that was not supposed to be changed was wrong somehow (edited)
Avatar
Anonymous 21-Jul-20 12:17 AM
i also found the symbol on the website
@Anonymous Majboor |psi> is a variable representing a generic quantum state. The context will tell you which particular state it is representing then.
Avatar
Anonymous 21-Jul-20 12:18 AM
@Anonymous Majboor Not sure if you're asking for clarification, but phi is the angle between X&Y in the Bloch sphere, psi is the statevector
yes what soham said^
Avatar
Anonymous 21-Jul-20 12:18 AM
@Anonymous SAPV Yes, It seems the code provided on the lab that was not supposed to be changed was wrong somehow
@Anonymous Well I did not had to change the given code and the program still did not show any error. Good if it works.
Avatar
Anonymous 21-Jul-20 12:18 AM
Thank you all very much.
👍 1
Avatar
Anonymous 21-Jul-20 12:19 AM
@Anonymous Well I did not had to change the given code and the program still did not show any error. Good if it works.
@Anonymous SAPV Can you show me your code in a pm? The last cell before grading at least
Avatar
Anonymous 21-Jul-20 12:19 AM
@Anonymous Majboor Glad to help! Learning a lot from reading everyone's posts as a beginner
👍 1
Avatar
Anonymous 21-Jul-20 12:29 AM
Why is i multiplied by j for the bell states?
Aren't they both the same? Both representations of imaginary numbers?
Ah bell states allow us to create entanglement between two qubits?
Avatar
Anonymous 21-Jul-20 12:33 AM
Why is i multiplied by j for the bell states?
@Anonymous Majboor i and j do not represent imaginary numbers in that case, i and j are 0 or 1 depending on which Bell state you are looking at. In other words they are variables. (edited)
Ah bell states allow us to create entanglement between two qubits?
@Anonymous Majboor Bell states are entangled states of two qubits.
Avatar
Anonymous 21-Jul-20 12:35 AM
Ok. Thank you. Sorry for so many questions
Avatar
Anonymous 21-Jul-20 12:36 AM
Nothing to be sorry about. If you are learning it for the first time then these questions are natural.
Avatar
Anonymous 21-Jul-20 12:36 AM
That feels good to know 🙂
Avatar
Anonymous 21-Jul-20 12:38 AM
Good morning. Does the message of the submission appear once? I managed to solve it but I run that box several times and only now it only says it is correct
Avatar
Anonymous 21-Jul-20 12:39 AM
It appears each time you submit.
Mustve been an issue with the juptyer notebook
Avatar
Anonymous 21-Jul-20 12:40 AM
Good morning. Does the message of the submission appear once? I managed to solve it but I run that box several times and only now it only says it is correct
@Anonymous It can take some time to appear.
Avatar
Anonymous 21-Jul-20 12:41 AM
It appears each time you submit.
@Anonymous Majboor I closed the session before killing the process in the terminal. Would it be the cause?
@Anonymous It can take some time to appear.
@Anonymous I'll open that again
Avatar
Anonymous 21-Jul-20 12:43 AM
What is the syntax for using QuantumCircuit.initialize() ?
Avatar
Anonymous 21-Jul-20 12:45 AM
What is the syntax for using QuantumCircuit.initialize() ?
@Anonymous 🙂
Avatar
Anonymous 21-Jul-20 12:46 AM
@Anonymous thanks!
Avatar
Anonymous 21-Jul-20 12:47 AM
What is the syntax for using QuantumCircuit.initialize() ?
@Anonymous This is quite useful for the lab! https://qiskit.org/documentation/tutorials/circuits/3_summary_of_quantum_operations.html#Arbitrary-initialization (I think someone linked it previously)
👍 1
Avatar
Anonymous 21-Jul-20 12:49 AM
I’m not able to download lab zip file
Can anyone help
Avatar
Anonymous 21-Jul-20 12:51 AM
Guys if anyone is done with the lab and willing to help lemme know
👋 1
Avatar
Anonymous 21-Jul-20 12:51 AM
I somehow still get this error
Avatar
Anonymous 21-Jul-20 12:52 AM
im still stuck at
Avatar
Anonymous 21-Jul-20 12:52 AM
Im working on the lab session now since it started and i dont feel im getting any closer
Avatar
Anonymous 21-Jul-20 12:52 AM
me too
Avatar
Anonymous 21-Jul-20 12:52 AM
me too
what i posted seems to be bell state superscript 01
so i need to gate to get there
👍 1
Avatar
Anonymous 21-Jul-20 12:53 AM
do you guys wanna hop in like some voice channel and talk
Avatar
Anonymous 21-Jul-20 12:53 AM
@Anonymous did you try taking reference from the textbook?
Avatar
Anonymous 21-Jul-20 12:53 AM
we are using the lab syntax
Avatar
Anonymous 21-Jul-20 12:54 AM
https://qiskit.org/textbook/ch-algorithms/teleportation.html <- great resource for the quantum teleportation portion 😄
A university quantum algorithms/computation course supplement based on Qiskit
👍🏻 2
QiskitMulti 2
Avatar
Anonymous 21-Jul-20 12:54 AM
thanks @Anonymous
👍 1
Avatar
Anonymous 21-Jul-20 12:55 AM
I'm getting a lot of type errors. The parameters defined in the functions are register indices, right? That's how we have to treat them?
Avatar
Anonymous 21-Jul-20 12:56 AM
I somehow still get this error
@Anonymous try clbit1_Alice[0]. Same for clbit2.
Avatar
Anonymous 21-Jul-20 12:57 AM
I somehow still get this error
@Anonymous Use the "measure" instead of "measure_active" function 🙂 (edited)
👍 1
Avatar
Anonymous 21-Jul-20 12:57 AM
im still stuck at
@Anonymous Majboor Check the notes. See what state you have start with to get those states. Then just follow the same procedure given in the notebook.
👍 1
Im working on the lab session now since it started and i dont feel im getting any closer
@Anonymous Might want to take a look at Abe's videos on YouTube on programming with Qiskit.
Avatar
Anonymous 21-Jul-20 01:04 AM
In case someone is confused, one can also use .c_if(clbit, 1) after an gate instruction, which only applies the gate if the measurement result is 1. This is also mentioned in the qiskit textbook.
👍 3
Avatar
Anonymous 21-Jul-20 01:08 AM
This line seems to be giving type errors
Is there an issue with measuring into the classical registers?
Avatar
Anonymous 21-Jul-20 01:09 AM
Yeah that gave me an error when I wrote it like that too
Do the measurements in two separate statements
circuit.measure(qbit1, cbit1) circuit.measure(qbit2, cbit2)
👍🏻 3
Avatar
Anonymous 21-Jul-20 01:13 AM
@Anonymous thanks that worked!
Avatar
Anonymous 21-Jul-20 01:13 AM
Alright guys! I am a little behind.
Avatar
Anonymous 21-Jul-20 01:14 AM
This line seems to be giving type errors
@Anonymous You have to use clbit1_Alice[0]. Same for the other classical bit.
Avatar
Anonymous 21-Jul-20 01:14 AM
So when you entangle the qubits. All you have to do is apply hadamard(H) operator to Alice's qubit and then use it as a control to apply cx on Bob's qubit?
Does that seem close to right?
Avatar
Anonymous 21-Jul-20 01:15 AM
Yes.
👍🏻 1
Avatar
Anonymous 21-Jul-20 01:15 AM
Yep 🙂
👍🏻 1
Avatar
Anonymous 21-Jul-20 01:15 AM
oh nice!
Avatar
Anonymous 21-Jul-20 01:16 AM
@Anonymous You have to use clbit1_Alice[0]. Same for the other classical bit.
@Anonymous cl bits have to be indexed like this everywhere?
Avatar
Anonymous 21-Jul-20 01:17 AM
@Anonymous cl bits have to be indexed like this everywhere?
@Anonymous Nope
Avatar
Anonymous 21-Jul-20 01:18 AM
@Anonymous cl bits have to be indexed like this everywhere?
@Anonymous Depends on the function. Here the classical bits are initialized as ClassicalRegisters. But when you use the measure function the way you have it needs the value. So you have to provide the index.
Avatar
Anonymous 21-Jul-20 01:19 AM
how does an identity matrix look like in dirac notation?
Avatar
Anonymous 21-Jul-20 01:19 AM
|0><0| + |1><1|
and that works for any orthogonal vectors
Avatar
Anonymous 21-Jul-20 01:19 AM
Ah, ok
Avatar
Anonymous 21-Jul-20 01:19 AM
*orthonormal vectors
Avatar
Anonymous 21-Jul-20 01:20 AM
How do you figure out the identity matrix if it's 4x4?
Is there a pattern?
Avatar
Anonymous 21-Jul-20 01:20 AM
the ones need to be in the diagonal
Avatar
Anonymous 21-Jul-20 01:20 AM
How do you figure out the identity matrix if it's 4x4?
@Anonymous Lam Use all the four basis states in the same way.
Avatar
Anonymous 21-Jul-20 01:20 AM
It's 1s on the diagonals and 0s everywhere else
👍🏻 1
Oh wait, yeah what @Anonymous said
Avatar
Anonymous 21-Jul-20 01:21 AM
Mb, I meant how do you translate a 4x4 identity matrix into dirac notation?
Avatar
Anonymous 21-Jul-20 01:21 AM
|00><00| + |01><01| + |10><10| + |11><11|
Avatar
Anonymous 21-Jul-20 01:21 AM
Okay! so the only time we gonna use classical bits is when Bob is trying to apply the gates right??
Avatar
Anonymous 21-Jul-20 01:21 AM
|00><00| + |01><01| + |10><10| + |11><11|
@Anonymous Would there be a pattern?
Avatar
Anonymous 21-Jul-20 01:22 AM
Okay! so the only time we gonna use classical bits is when Bob is trying to apply the gates right??
@Anonymous Alice sends the classical bits to Bob. And then you use that on the output. (edited)
Avatar
Anonymous 21-Jul-20 01:22 AM
Is there something wrong with the circuit? It is giving the wrong answer
Avatar
Anonymous 21-Jul-20 01:22 AM
@Anonymous Would there be a pattern?
@Anonymous Lam Yeah, so for a 2^n x 2^n identity matrix, you add all terms like that, using all of the basis states
Avatar
Anonymous 21-Jul-20 01:22 AM
Is there something wrong with the circuit? It is giving the wrong answer
@Anonymous Check your Bell State measurement 🙂
👍 1
Avatar
Anonymous 21-Jul-20 01:23 AM
@Anonymous Would there be a pattern?
@Anonymous Lam Yes, pair each basis bra with its corresponding ket and sum them.
Avatar
Anonymous 21-Jul-20 01:23 AM
Is there something wrong with the circuit? It is giving the wrong answer
@Anonymous your bell measurement, first its the cnot gate and second the hadamard before the measurements
Avatar
Anonymous 21-Jul-20 01:23 AM
@Anonymous Check your Bell State measurement 🙂
@Anonymous Ahh the inverse, right.
Avatar
Anonymous 21-Jul-20 01:23 AM
@Anonymous Lam Yes, pair each basis bra with its corresponding ket and sum them.
@Anonymous Ah I see, thanks!
Avatar
Anonymous 21-Jul-20 01:23 AM
I just assumed the inverse is the same XD
Avatar
Anonymous 21-Jul-20 01:24 AM
im still stuck at
@Anonymous Majboor try Hadamard on the first qubit, NOT on the second and then a CNOT, to make the other just add a Z gate
Avatar
Anonymous 21-Jul-20 01:25 AM
Done🥳 tysm guys
🥳 3
Avatar
Anonymous 21-Jul-20 01:25 AM
If I have |0><0| x |0><0|, does it become 0 or |0><0|?
Avatar
Anonymous 21-Jul-20 01:26 AM
|0><0|
Avatar
Anonymous 21-Jul-20 01:26 AM
@Anonymous Ah I see, thanks!
@Anonymous Lam It's easy to check. Just apply that operator to any state in that basis and see what you get. If you wrote it correctly you will get back the same state.
👍🏻 1
Avatar
Anonymous 21-Jul-20 01:27 AM
when you work in dirac notation, just join them together when you multiply |0><0|0><0| The <0|0> in the center is an inner product that equals 1, so you get 1 * (|0><0|)
I like to work by squeezing the terms together and taking out the inner products
Avatar
Anonymous 21-Jul-20 01:28 AM
So that means a |1><1| x |0><0| = |1> x 0 x <0| = 0?
Avatar
Anonymous 21-Jul-20 01:28 AM
yes
Avatar
Anonymous 21-Jul-20 01:28 AM
Ok, thanks
Avatar
Anonymous 21-Jul-20 01:33 AM
@Anonymous Majboor try Hadamard on the first qubit, NOT on the second and then a CNOT, to make the other just add a Z gate
@Anonymous i am just confused with syntax and representing the transformation on a q sphere
I got the transformations applied
Avatar
Anonymous 21-Jul-20 01:42 AM
for initial_state, what does the [0,1] mean?
Avatar
Anonymous 21-Jul-20 01:45 AM
The 0th index is the probability for |0>
and the 1st index is the probability for |1>
In this example, it's 100% |1>
Avatar
Anonymous 21-Jul-20 01:46 AM
So if I want to set it to 0, it needs to be [1,0]?
Avatar
Anonymous 21-Jul-20 01:46 AM
Yes, if you want 100% |0> state
Avatar
Anonymous 21-Jul-20 01:47 AM
Ok, thanks
Avatar
Anonymous 21-Jul-20 01:55 AM
Anyone know how do we submit the labwork?
Avatar
Anonymous 21-Jul-20 01:56 AM
Anyone know how do we submit the labwork?
@Anonymous The last code cell in the notebook grades your solution. Make sure to fix the 'name' and 'email' variable and run it and you'll be all set 🙂
qiskitwhite 1
Avatar
Anonymous 21-Jul-20 01:57 AM
@Anonymous The last code cell in the notebook grades your solution. Make sure to fix the 'name' and 'email' variable and run it and you'll be all set 🙂
@Anonymous That automatically sends my results to IBM?
Avatar
Anonymous 21-Jul-20 01:57 AM
@Anonymous That automatically sends my results to IBM?
@Anonymous Yep!
qiskitwhite 1
Avatar
Anonymous 21-Jul-20 01:57 AM
Sweet! Thanks @Anonymous
👍 1
Avatar
Anonymous 21-Jul-20 01:59 AM
I'm a bit confused on this section
What do I do here?
Avatar
Anonymous 21-Jul-20 02:00 AM
Finding it a little hard to understand some parts of it.. like the middle Z part.. can someone please explain this to me like what happens in the S, S+ and Z transitions?
Avatar
Anonymous 21-Jul-20 02:00 AM
In the lecture, she tensored |psi> and the entangled qubits
Avatar
Anonymous 21-Jul-20 02:01 AM
I'm a bit confused on this section
@Anonymous Lam This is where you'll need to do a Bell measurement of Alice's qubits 🙂
Avatar
Anonymous 21-Jul-20 02:01 AM
Finding it a little hard to understand some parts of it.. like the middle Z part.. can someone please explain this to me like what happens in the S, S+ and Z transitions?
@Anonymous S = 90 degree phi rotation, S+ = -90 degree phi rotation, Z = 180 phi rotation
Avatar
Anonymous 21-Jul-20 02:02 AM
Why are we applying these rotations?
Avatar
Anonymous 21-Jul-20 02:02 AM
@Anonymous Lam This is where you'll need to do a Bell measurement of Alice's qubits 🙂
@Anonymous are these the bell measurement gates I need to put on?
Avatar
Anonymous 21-Jul-20 02:03 AM
and why is the changes seen only in the South Pole?
Avatar
Anonymous 21-Jul-20 02:03 AM
and why is the changes seen only in the South Pole?
@Anonymous South pole is |1>
Avatar
Anonymous 21-Jul-20 02:03 AM
i mean the phase is changing only in the south pole, right?
Avatar
Anonymous 21-Jul-20 02:03 AM
@Anonymous are these the bell measurement gates I need to put on?
@Anonymous Lam Yep, the first two gates does the trick here, then measure those two qubits
Avatar
Anonymous 21-Jul-20 02:04 AM
@Anonymous Lam Yep, the first two gates does the trick here, then measure those two qubits
@Anonymous Then why am I given 4 parameter? qubit1_Alice, qubit2_Alice, clbit1_Alice, clbit2_Alice
Avatar
Anonymous 21-Jul-20 02:05 AM
@Anonymous Then why am I given 4 parameter? qubit1_Alice, qubit2_Alice, clbit1_Alice, clbit2_Alice
@Anonymous Lam When you measure the qubit, you'll be saving that measurement into a classical bit
Avatar
Anonymous 21-Jul-20 02:05 AM
@Anonymous Lam When you measure the qubit, you'll be saving that measurement into a classical bit
@Anonymous Ohh, ok thanks. I thought the clbit1_Alice was a control bit lol
Avatar
Anonymous 21-Jul-20 02:06 AM
i mean the phase is changing only in the south pole, right?
@Anonymous the Z gate changes the phase of vector 1 which is the south pole. thus change oocurs in the south pole. there's no generalisation to it.
Avatar
Anonymous 21-Jul-20 02:06 AM
i mean the phase is changing only in the south pole, right?
@Anonymous In the equation, it's e^i(phi)
Avatar
Anonymous 21-Jul-20 02:06 AM
Hi guys. How can i access the lab recording?
Avatar
Anonymous 21-Jul-20 02:06 AM
Hi guys. How can i access the lab recording?
@Anonymous It's in #lab-exercises
Avatar
Anonymous 21-Jul-20 02:06 AM
@Anonymous Lam @Anonymous Joshi got it.. thanks..
👍 2
Avatar
Anonymous 21-Jul-20 02:07 AM
@Anonymous It's in #lab-exercises
@Anonymous Thank you!
👍 1
Avatar
Anonymous 21-Jul-20 02:09 AM
In here, why are the parameters for measure [0,1] and [0,1]?
Wouldn't it be [0,0] and [1,1]?
Avatar
Anonymous 21-Jul-20 02:11 AM
The arguments in that are
circuit.measure([index of the quantum bits to be measured], [index of the classical bits to store the measurements])
so it's saying measure qubits 0 and 1, and store the measurement results in clasical bits 0 and 1
Avatar
Anonymous 21-Jul-20 02:11 AM
Ohh, ok
Thanks
Avatar
Anonymous 21-Jul-20 02:12 AM
Can someone tell me whats wrong with this?
Avatar
Anonymous 21-Jul-20 02:13 AM
Can someone tell me whats wrong with this?
@Anonymous What error did it give you?
Oh wait, I see, check your second complex
👍 1
Avatar
Anonymous 21-Jul-20 02:14 AM
Avatar
Anonymous 21-Jul-20 02:16 AM
Hmmm, your error is in the bell_meas_Alice_qubits function
But see if fixing 'desired_vector' fixes it 🙂
Avatar
Anonymous 21-Jul-20 02:16 AM
@Anonymous remove the draw function
someone else had the same issue earlier today
Avatar
Anonymous 21-Jul-20 02:17 AM
Oh yeah, that's in your bell_meas_Alice_qubits function
Avatar
Anonymous 21-Jul-20 02:18 AM
also, take a good look at the state you're initializing the qubit to in 'desired_vector'
Avatar
Anonymous 21-Jul-20 02:21 AM
What does CircuitError: "Type error handling [ClassicalRegister(1, 'c10'), ClassicalRegister(1, 'c11')] (<class 'list'>)" mean?
Avatar
Anonymous 21-Jul-20 02:21 AM
Can someone tell me whats wrong with this?
@Anonymous i think you won't need the *complex(0,1) statements in the desired vector.
try removing them and then run the cell?
Avatar
Anonymous 21-Jul-20 02:23 AM
What does CircuitError: "Type error handling [ClassicalRegister(1, 'c10'), ClassicalRegister(1, 'c11')] (<class 'list'>)" mean?
@Anonymous Lam Hmmm, what function gave you that error? It usually means you mixed up Classical and Quantum
Avatar
Anonymous 21-Jul-20 02:23 AM
@Anonymous Lam Hmmm, what function gave you that error? It usually means you mixed up Classical and Quantum
@Anonymous moreover you cannot use classical register 1 in both the statements
👍 1
Avatar
Anonymous 21-Jul-20 02:24 AM
@Anonymous @Anonymous Joshi my bell_meas_Alice_qubits function did
Avatar
Anonymous 21-Jul-20 02:24 AM
Was it measure?
Avatar
Anonymous 21-Jul-20 02:24 AM
yea
i did given_circuit.measure([qubit1_Alice, qubit2_Alice], [clbit1_Alice, clbit2_Alice])
Avatar
Anonymous 21-Jul-20 02:24 AM
i did given_circuit.measure([qubit1_Alice, qubit2_Alice], [clbit1_Alice, clbit2_Alice])
@Anonymous Lam this is correct.
Avatar
Anonymous 21-Jul-20 02:25 AM
ohhhhhh, it's easier if you separate them, i think someone else had the same problem
like call measure twice
Avatar
Anonymous 21-Jul-20 02:25 AM
Ok, I'll try that
Now I'm getting CircuitError: 'carg is not a Clbit'
Here's the entire error
Avatar
Anonymous 21-Jul-20 02:27 AM
Try: given_circuit.measure(qubit1_Alice, clbit1_Alice)
Avatar
Anonymous 21-Jul-20 02:27 AM
Avatar
Anonymous 21-Jul-20 02:27 AM
same thing for 2
Avatar
Anonymous 21-Jul-20 02:27 AM
Ok
Avatar
Anonymous 21-Jul-20 02:27 AM
ohhhhhhhh i seeeeee
you're measuring the qubit and putting the result into a classical register
so the inputs to measure is (qubit, classicalbit)
Avatar
Anonymous 21-Jul-20 02:28 AM
Ohhhh, i see
It was probably because I did given_circuit.measure([qubit1_Alice, qubit2_Alice], [clbit1_Alice, clbit2_Alice]) earlier
Thanks!
Avatar
Anonymous 21-Jul-20 02:30 AM
It was probably because I did given_circuit.measure([qubit1_Alice, qubit2_Alice], [clbit1_Alice, clbit2_Alice]) earlier
@Anonymous Lam oh dang 🙈
Avatar
Anonymous 21-Jul-20 02:31 AM
Is the circuit supposed to look like this?
I'm getting it wrong
Avatar
Anonymous 21-Jul-20 02:31 AM
not quite, check your bell measurement (edited)
also, your initialize state doesn't match the one asked
Avatar
Anonymous 21-Jul-20 02:32 AM
Just seeing if im making progress here! Does the Cuircit look correct?
Avatar
Anonymous 21-Jul-20 02:33 AM
Just seeing if im making progress here! Does the Cuircit look correct?
@Anonymous Check your last two gates 🙂
Avatar
Anonymous 21-Jul-20 02:33 AM
also, your initialize state doesn't match the one asked
@Anonymous I thought the bell state looked like this:
Avatar
Anonymous 21-Jul-20 02:34 AM
switch the order of those for the measurement 🙂
Avatar
Anonymous 21-Jul-20 02:34 AM
@Anonymous I thought the bell state looked like this:
@Anonymous Lam but you don't need to initialise the qubit 0 to a bell state.
refer the question
Avatar
Anonymous 21-Jul-20 02:35 AM
@Anonymous Lam but you don't need to initialise the qubit 0 to a bell state.
@Anonymous Joshi Yep, I understand the initialization
I thought that I needed to set the qubits to |0> instead of the secret qubit
Avatar
Anonymous 21-Jul-20 02:36 AM
I thought that I needed to set the qubits to |0> instead of the secret qubit
@Anonymous Lam its the squareroot 0.70 and 0.30 something to which we need to initialise!
Avatar
Anonymous 21-Jul-20 02:36 AM
Just seeing if im making progress here! Does the Cuircit look correct?
@Anonymous You almost have it except the last two gates, you want to apply gates based on the measurements of Alice's qubits
Avatar
Anonymous 21-Jul-20 02:36 AM
Im getting this error saying there is no module named gradin_tools. what to do
Avatar
Anonymous 21-Jul-20 02:37 AM
Im getting this error saying there is no module named gradin_tools. what to do
@Anonymous keep all the files in the folder lab1 at one place
👍 1
Avatar
Anonymous 21-Jul-20 02:37 AM
Im getting this error saying there is no module named gradin_tools. what to do
@Anonymous The grading_tools folder should be in the same folder as your notebook
👍 1
Avatar
Anonymous 21-Jul-20 02:37 AM
omg after 17:37hours im done
🥳 3
💯 2
Avatar
Anonymous 21-Jul-20 02:38 AM
Why is the CNOT before the H gate?
Avatar
Anonymous 21-Jul-20 02:38 AM
Woo hoo! 😄
Avatar
Anonymous 21-Jul-20 02:38 AM
not quite though
Avatar
Anonymous 21-Jul-20 02:38 AM
Why is the CNOT before the H gate?
@Anonymous Lam that's the circuit for bell measurement. it's opposite of what we do while construction of bell state.
Avatar
Anonymous 21-Jul-20 02:39 AM
Idk if it's the right way of saying it, but it's kinda like taking the inverse
👍 1
Avatar
Anonymous 21-Jul-20 02:39 AM
What the difference between them?
Avatar
Anonymous 21-Jul-20 02:39 AM
One is making the bell state, one is measuring
So making the bell state produces the entangled pair
👍 1
Avatar
Anonymous 21-Jul-20 02:41 AM
Ah, I see
So CNOT then H = measure bell state
👍 1
And H then CNOT = contstruct bell state
👍 1
Avatar
Anonymous 21-Jul-20 02:43 AM
Yep! 🙂
Avatar
Anonymous 21-Jul-20 02:45 AM
anyone got the notation for the qiskit conditionals
Avatar
Anonymous 21-Jul-20 02:47 AM
@Anonymous Joshi @Anonymous Thanks!!it worked!😃
💯 2
Avatar
Anonymous 21-Jul-20 02:47 AM
anyone got the notation for the qiskit conditionals
@Anonymous Check out the c_if function. It takes in a classical qubit and what you want it to equal (edited)
👍 1
Avatar
Anonymous 21-Jul-20 02:48 AM
I'm getting this, and it says I'm wrong
Avatar
Anonymous 21-Jul-20 02:48 AM
is anyone down having a chat about the problem? I have completed it though still dont fully understand it
Avatar
Anonymous 21-Jul-20 02:48 AM
I'm getting this, and it says I'm wrong
@Anonymous Lam You're missing a few gates in the end, Bob's gates
👍 1
Avatar
Anonymous 21-Jul-20 02:49 AM
I have this for the X and Z gate
👍 1
Avatar
Anonymous 21-Jul-20 02:50 AM
Ahhh, i see, use c_if
Avatar
Anonymous 21-Jul-20 02:51 AM
Like replace if with c_if?
Avatar
Anonymous 21-Jul-20 02:51 AM
nah, take out if lines
after the '(qubit_Bob)'
apply the c_if function
Avatar
Anonymous 21-Jul-20 02:52 AM
I'm having trouble with the initialization...help please
Avatar
Anonymous 21-Jul-20 02:52 AM
I'm having trouble with the initialization...help please
@Anonymous What do you have so far? 🙂
Avatar
Anonymous 21-Jul-20 02:52 AM
What's the c_if function?
Avatar
Anonymous 21-Jul-20 02:53 AM
Avatar
Anonymous 21-Jul-20 02:53 AM
What's the c_if function?
@Anonymous Lam checks values of classical register like a normal if (edited)
Avatar
Anonymous 21-Jul-20 02:53 AM
maybe refer this for initialization: https://quantumcomputing.stackexchange.com/questions/1413/how-to-create-an-arbitrary-state-in-qiskit-for-a-local-qasm-simulator> I'm having trouble with the initialization...help please @Anonymous (edited)
I would like to play with a quantum circuit local_qasm_simulator in QISKit, but I do not want to implement a separate quantum circuit that would prepare an initial state. The way I do it now is by
Avatar
Anonymous 21-Jul-20 02:53 AM
when its just saying correct, is that then the most perfect solution?
Avatar
Anonymous 21-Jul-20 02:53 AM
So it checks that value and if it's true, it applies that gate
when its just saying correct, is that then the most perfect solution?
@Anonymous Yep 🥳 You're all set 😄 (edited)
Avatar
Anonymous 21-Jul-20 02:54 AM
I've defined a 'desired vector' as desired_vector = [np.sqrt(0.7) * complex(0, 1), np.sqrt(0.3) * complex(1, 0), 0]...how do I embed it in the given_circuit?
Avatar
Anonymous 21-Jul-20 02:54 AM
@Anonymous Lam checks values of classical register like a normal if
@Anonymous Like this?
Avatar
Anonymous 21-Jul-20 02:54 AM
I've defined a 'desired vector' as desired_vector = [np.sqrt(0.7) * complex(0, 1), np.sqrt(0.3) * complex(1, 0), 0]...how do I embed it in the given_circuit?
@Anonymous You don't need the complex parts
Avatar
Anonymous 21-Jul-20 02:54 AM
@Anonymous Like this?
@Anonymous Lam yes. performs the x operation if that classical bit is 1
Avatar
Anonymous 21-Jul-20 02:54 AM
@Anonymous wow if thats the case, then the last 18 hours were worth it
💯 1
Avatar
Anonymous 21-Jul-20 02:55 AM
@Anonymous Like this?
@Anonymous Lam wait no XD
Avatar
Anonymous 21-Jul-20 02:55 AM
ill take a shower now and go to sleep
Avatar
Anonymous 21-Jul-20 02:55 AM
@Anonymous Lam yes. performs the x operation if that classical bit is 1
@Anonymous Wait that works? 😮
Avatar
Anonymous 21-Jul-20 02:55 AM
that's was a bit confusing...but even if I delete the complex part, how do I embed the desired vector in?
Avatar
Anonymous 21-Jul-20 02:55 AM
all the best to the people still trying
Avatar
Anonymous 21-Jul-20 02:56 AM
What i meant was: given_circuit.x(qubit_Bob).c_if(clbit2_Alice, 1)
Avatar
Anonymous 21-Jul-20 02:56 AM
@Anonymous Wait that works? 😮
@Anonymous not the way they wrote. i was updating. it's more like operation.c_if(...) @Anonymous Lam (edited)
Avatar
Anonymous 21-Jul-20 02:56 AM
that's was a bit confusing...but even if I delete the complex part, how do I embed the desired vector in?
@Anonymous use initialize function
Avatar
Anonymous 21-Jul-20 02:56 AM
we need a better lab discussion environment...this one grows busy too fast
👍 3
Avatar
Anonymous 21-Jul-20 02:56 AM
@Anonymous not the way they wrote. i was updating. it's more like
>
operation.c_if(...) @Anonymous Lam
@Anonymous Gotcha, I would have been surprised if that worked lol
Avatar
Anonymous 21-Jul-20 02:57 AM
I'm getting this:
Avatar
Anonymous 21-Jul-20 02:57 AM
>
I'm having trouble with the initialization...help please @Anonymous
@Anonymous Joshi refer this @Anonymous
I would like to play with a quantum circuit local_qasm_simulator in QISKit, but I do not want to implement a separate quantum circuit that would prepare an initial state. The way I do it now is by
Avatar
Anonymous 21-Jul-20 02:57 AM
alright..let's try
Avatar
Anonymous 21-Jul-20 02:57 AM
I'm getting this:
@Anonymous Lam given_circuit.x(qubit_Bob).c_if(clbit2_Alice, 1)
💯 2
Avatar
Anonymous 21-Jul-20 02:58 AM
Ohhh
Avatar
Anonymous 21-Jul-20 02:58 AM
The instruction part was given_circuit.x(qubit_Bob)
Avatar
Anonymous 21-Jul-20 02:58 AM
I thought the c_if is its own if statement
Avatar
Anonymous 21-Jul-20 02:59 AM
thank you ... I'm trying to see if it's gna work out
💯 1
Avatar
Anonymous 21-Jul-20 03:00 AM
@Anonymous @Anonymous Joshi Got it, thanks!
💯 2
Avatar
Anonymous 21-Jul-20 03:00 AM
Yayyyyyy 😄
Avatar
Anonymous 21-Jul-20 03:00 AM
Now I can finally sleep 😂
Avatar
Anonymous 21-Jul-20 03:00 AM
Hi! Thank you so much for everyone who has been asking and aswering questions, I had a bunch of help from previous feedbacks :D.
Now I can finally sleep 😂
@Anonymous Lam #same hahahaha
Avatar
Anonymous 21-Jul-20 03:01 AM
Same, imma sleep, it's too late here lol
Avatar
Anonymous 21-Jul-20 03:01 AM
🙌 🙌 🙌 🙌 🙌
Avatar
Anonymous 21-Jul-20 03:01 AM
well its morning here in india 😂😂
Avatar
Anonymous 21-Jul-20 03:01 AM
Thank you so much for your help @Anonymous I looked for some of your answers : )!
😊 1
Avatar
Anonymous 21-Jul-20 03:02 AM
Great to see y'all are getting results! Glad to see everyone working together and helping each other out 😄
Avatar
Anonymous 21-Jul-20 03:02 AM
well its morning here in india 😂😂
@Anonymous Joshi It's 3am here 😂
😂 2
Avatar
Anonymous 21-Jul-20 03:02 AM
@Anonymous Joshi It's 3am here 😂
@Anonymous Lam Same for me as well! XD
😂 2
Avatar
Anonymous 21-Jul-20 03:06 AM
Done it
qiskitsmart 3
We have to do further submission or this is auto submitted??
Avatar
Anonymous 21-Jul-20 03:07 AM
Woo hoo! 🥳
Avatar
Anonymous 21-Jul-20 03:07 AM
why are we applying a cnot before h gate when making a bell measurement between alice's q0 and q1 cause it brings bout no change in the statevector
it legit gives the same result
Avatar
Anonymous 21-Jul-20 03:07 AM
We have to do further submission or this is auto submitted??
@Anonymous Udayakumar You're all set 🙂
Avatar
Anonymous BOT 21-Jul-20 03:07 AM
Your hand has been raised! A mentor will drop in as soon as they are available.
Avatar
Anonymous 21-Jul-20 03:10 AM
@Anonymous Udayakumar You're all set 🙂
@Anonymous okay.
Avatar
Anonymous 21-Jul-20 03:11 AM
Can anybody tell me how to do a tensor product with numpy?
If at all that is possible
Avatar
Anonymous 21-Jul-20 03:12 AM
Avatar
Anonymous 21-Jul-20 03:13 AM
Thank you so much
Avatar
Anonymous 21-Jul-20 03:16 AM
thank you so much for the reference guys...it worked
👍 1
Avatar
Anonymous 21-Jul-20 03:23 AM
whats this error??
Avatar
Anonymous 21-Jul-20 03:24 AM
how did you write your name and email?
the solution looks fine
Avatar
Anonymous 21-Jul-20 03:27 AM
@Anonymous the usual way, as a string
Avatar
Anonymous 21-Jul-20 03:28 AM
Hello, I just got notification "lab1/ex1 - correct" WITHOUT "Hurray! You have a new correct answer! Let's submit it...". How should I submit it?
Avatar
Anonymous 21-Jul-20 03:29 AM
@Anonymous you get this error if a function is expecting a single value and you're passing an array
Avatar
Anonymous 21-Jul-20 03:31 AM
@Anonymous but all the functions return circuits only
Avatar
Anonymous 21-Jul-20 03:32 AM
@Anonymous are you definitely returning the circuit and not the result of circuit.draw()?
Avatar
Anonymous 21-Jul-20 03:33 AM
@Anonymous H yeah the return statement is already in the template returning just circuits. i havent changed anything
Avatar
Anonymous 21-Jul-20 03:34 AM
Okay I will message you independently
👍 1
Avatar
Anonymous 21-Jul-20 03:42 AM
Guys could someone tell me if we have to submit labwork each day or if we can submit it at once before July 31 (edited)
Avatar
Anonymous 21-Jul-20 03:44 AM
Why am I getting this error while trying to I initialise the circuit?
Avatar
Anonymous 21-Jul-20 03:46 AM
You're initazing the wrong thing
Avatar
Anonymous 21-Jul-20 03:47 AM
Got it, thanks!
👍 1
Avatar
Anonymous 21-Jul-20 03:55 AM
You're initazing the wrong thing
@Anonymous Lam Which notebook is that screenshot from?
Avatar
Anonymous 21-Jul-20 03:56 AM
@Anonymous Lam Which notebook is that screenshot from?
@Anonymous Fitter I found it in a study group and just copied the image
Avatar
Anonymous 21-Jul-20 03:56 AM
Also, I am stuck on the initialization part?
I can not understand much from the link posted above
Anyone can help?
Avatar
Anonymous 21-Jul-20 03:57 AM
U want to initialize the qubit to sqrt 0.7 and sqrt 0.3
Avatar
Anonymous 21-Jul-20 03:57 AM
Hi! 😄
Avatar
Anonymous 21-Jul-20 03:57 AM
Avatar
Anonymous 21-Jul-20 03:58 AM
@Anonymous and I wrote a notebook to show all the Bell states, but the setup can be used to run the labs. We are using Pyenv for handling python versions and Poetry for dependency management. We hope this can be useful for you all, cheers from Peru: D https://github.com/PCPUNMSM/quantum-computing
Materials written by @Anonymous and @Anonymous as part ot the IBM Qiskit Global Summer School. - PCPUNMSM/quantum-computing
qiskitwhite 1
💯 1
🤩 1
😱 1
QuantumCircuit 1
Avatar
Anonymous 21-Jul-20 03:58 AM
U want to initialize the qubit to sqrt 0.7 and sqrt 0.3
@Anonymous Lam Yes
Avatar
Anonymous 21-Jul-20 03:58 AM
circuit.initalize(vector, index) shhould hlep
Avatar
Anonymous 21-Jul-20 03:58 AM
Greetings from Peru! 😄
Avatar
Anonymous 21-Jul-20 03:58 AM
circuit.initalize(vector, index) shhould hlep
@Anonymous ^
Avatar
Anonymous 21-Jul-20 03:59 AM
Vector is vector of probabilities right?
Avatar
Anonymous 21-Jul-20 04:00 AM
Yep
Avatar
Anonymous 21-Jul-20 04:00 AM
Vector is vector of probabilities right?
@Anonymous Fitter yes
Avatar
Anonymous 21-Jul-20 04:00 AM
Thank you 🙂
Avatar
Anonymous 21-Jul-20 04:01 AM
The initialize function can be used as this
circuit.initialize( [ amplitude_1, amplitude_3, ], qubit_index, )
It is not well documented because it is defined as a shorthand usage for Initialize class and injected in an extension module from qiskit-terra. the sources are at the bottom of this file if you want details about its implementation https://github.com/Qiskit/qiskit-terra/blob/master/qiskit/extensions/quantum_initializer/initializer.py (edited)
Terra provides the foundations for Qiskit. It allows the user to write quantum circuits easily, and takes care of the constraints of real hardware. - Qiskit/qiskit-terra
Avatar
Anonymous 21-Jul-20 04:03 AM
How do we entangle states? 😓
Or does the assign want us to generate Bell state?
Avatar
Anonymous 21-Jul-20 04:04 AM
@Anonymous and I wrote a notebook to show all the Bell states, but the setup can be used to run the labs. We are using Pyenv for handling python versions and Poetry for dependency management. We hope this can be useful for you all, cheers from Peru: D
> @Anonymous Fitter check this
Materials written by @Anonymous and @Anonymous as part ot the IBM Qiskit Global Summer School. - PCPUNMSM/quantum-computing
Avatar
Anonymous 21-Jul-20 04:04 AM
Hi @Anonymous Fitter, here you can find it :
Avatar
Anonymous 21-Jul-20 04:05 AM
Also you can get inspiration from here :D https://qiskit.org/textbook/ch-algorithms/teleportation.html
A university quantum algorithms/computation course supplement based on Qiskit
qiskitwhite 1
Avatar
Anonymous 21-Jul-20 04:05 AM
Yea so we got to make bell state, right?
By adding the H and CX gates/
Avatar
Anonymous 21-Jul-20 04:05 AM
Yeah
Like the circuit in the image
Avatar
Anonymous 21-Jul-20 04:05 AM
creating a bell pair and entanglement should be the same for this lab
Avatar
Anonymous 21-Jul-20 04:05 AM
Yes
Avatar
Anonymous 21-Jul-20 04:06 AM
Yep
Avatar
Anonymous 21-Jul-20 04:06 AM
A university quantum algorithms/computation course supplement based on Qiskit
this link was very useful for me, someone else posted it
Avatar
Anonymous 21-Jul-20 04:06 AM
Oh lol
I was overestimating things XD
Avatar
Anonymous 21-Jul-20 04:07 AM
Does submitting in the Jupyter notebook and getting the correct answer is all it required to submission?
Avatar
Anonymous 21-Jul-20 04:07 AM
I believe so, the grade.py file makes it appear to submit to a server
Avatar
Anonymous 21-Jul-20 04:08 AM
got it! Thanks!
Avatar
Anonymous 21-Jul-20 04:12 AM
can anybody help me with the entanglement? I'm completely lost
Avatar
Anonymous 21-Jul-20 04:16 AM
Yes
Avatar
Anonymous 21-Jul-20 04:21 AM
Do the assignments need to submitted every session before the next day to get a grade?
Avatar
Anonymous 21-Jul-20 04:23 AM
How do we do the measure part? (edited)
def bell_meas_Alice_qubits(given_circuit, qubit1_Alice, qubit2_Alice, clbit1_Alice, clbit2_Alice): ### WRITE YOUR CODE BETWEEN THESE LINES - START given_circuit.cx(qubit1_Alice, qubit2_Alice) given_circuit.h(qubit1_Alice) given_circuit.measure([qubit1_Alice, qubit2_Alice], [clbit1_Alice, clbit2_Alice]) ### WRITE YOUR CODE BETWEEN THESE LINES - END return given_circuit
I did this
Avatar
Anonymous 21-Jul-20 04:23 AM
Missed the c_if part. Never used it. Cool thing 😄
Avatar
Anonymous 21-Jul-20 04:23 AM
It gives me an error
Avatar
Anonymous 21-Jul-20 04:25 AM
Do measurements one by one @Anonymous Fitter
Avatar
Anonymous 21-Jul-20 04:25 AM
It gives me an error
@Anonymous Fitter .measure([qubit, cbit) then for [qubit2, cbit2]) do this. (edited)
👍 1
Avatar
Anonymous 21-Jul-20 04:25 AM
given_circuit.measure(qubit1_Alice, clbit1Alice)
👍 2
Avatar
Anonymous 21-Jul-20 04:26 AM
But in the textbook, they use a different way
They do measure([0,1], [0,1])
Avatar
Anonymous 21-Jul-20 04:26 AM
The data type is different
in that case 0 and 1 are numbers. in this cakse qubit1_Alice is a qiskit object QuantumRegister, if I am not mistaken
👍 1
Avatar
Anonymous 21-Jul-20 04:27 AM
So much for unified modular functions....sigh
💯 1
Avatar
Anonymous 21-Jul-20 04:28 AM
@Anonymous Fitter maybe you should split the measure into two
Avatar
Anonymous 21-Jul-20 04:28 AM
in that case 0 and 1 are numbers. in this cakse qubit1_Alice is a qiskit object QuantumRegister, if I am not mistaken
@Anonymous that might be the case.
Avatar
Anonymous 21-Jul-20 04:28 AM
QGSS have slack?
Avatar
Anonymous 21-Jul-20 04:28 AM
So much for unified modular functions....sigh
@Anonymous Fitter agreed, sometimes it's too messy
Avatar
Anonymous 21-Jul-20 04:29 AM
QGSS have slack?
@Anonymous nopes. only qiskit has slack but not specifically for qgss
Avatar
Anonymous 21-Jul-20 04:38 AM
Hi, Are we supposed to submit after grading?
Avatar
Anonymous 21-Jul-20 04:39 AM
Hi, Are we supposed to submit after grading?
@Anonymous grading == submission
Avatar
Anonymous 21-Jul-20 04:39 AM
@Anonymous Joshi Tanx
💯 1
Avatar
Anonymous 21-Jul-20 04:41 AM
Where to submit the lab files?
Avatar
Anonymous 21-Jul-20 04:42 AM
Where to submit the lab files?
@Anonymous run the last cell in the notebook with your name and email
Avatar
Anonymous 21-Jul-20 05:02 AM
How to measure in bell basis?
As basis is different do we have to change something?
Avatar
Anonymous 21-Jul-20 05:16 AM
I get this message when I run the last cell
🚫 Either you is too unreliable or the grading servers are down right now.
Avatar
Anonymous 21-Jul-20 05:17 AM
@Anonymous Anand but how would they know ?
Avatar
Anonymous 21-Jul-20 05:18 AM
@Anonymous is your internet connection stable? If yes there's probably an issue on their side.
Avatar
Anonymous 21-Jul-20 05:18 AM
The script runs in the background and sends your result automatically to the server (edited)
and yeah you need an internet connection to do that
you can check the grade.py file inside grading tools directory,,,but don't make any changes
Avatar
Anonymous 21-Jul-20 06:08 AM
How can I find out what each of the commands in QISKIT is doing? e.g. evolve. Is there any help file to find out
Avatar
Anonymous 21-Jul-20 06:10 AM
@Anonymous check documentation
Avatar
Anonymous 21-Jul-20 06:13 AM
Can anybody please guide me why hi error is coming?
Avatar
Anonymous 21-Jul-20 06:15 AM
@Anonymous we can''t see anything, even when enlarging the picture
better take a screenshot
Avatar
Anonymous 21-Jul-20 06:16 AM
Can anybody please guide me why hi error is coming?
@Anonymous measure both the qubits in diff steps.
👍 2
Avatar
Anonymous 21-Jul-20 06:16 AM
This one may help
@Anonymous Joshi but that way was provided by the lab
Avatar
Anonymous 21-Jul-20 06:19 AM
I believe you get this because you wrote circ.measure([qubitA, qubitB], [classicalA, classicalB])
Avatar
Anonymous 21-Jul-20 06:19 AM
@Anonymous no that would be useful if you're using numerical indexes but for nomenclated indexes using seperately helps (edited)
👍 1
Avatar
Anonymous 21-Jul-20 06:19 AM
The data types of the arguments of the function is different from numbers (as in .measure([0,1], [0,1])) (edited)
Avatar
Anonymous 21-Jul-20 06:20 AM
no that would be useful if you're using numerical indexes but for nomenclated indexes using seperately helps
@Anonymous you can also do it in one step but then you have to specify the index in the registers
Avatar
Anonymous 21-Jul-20 06:20 AM
Thanks @Anonymous !
Avatar
Anonymous 21-Jul-20 06:20 AM
Ok I am trying
Avatar
Anonymous 21-Jul-20 06:20 AM
circ.measure([qubitA[i], qubitB[j]], [classicalA[i], classicalB[j]])
Avatar
Anonymous 21-Jul-20 06:22 AM
Yes now they are showing some circuits
👍 2
Avatar
Anonymous 21-Jul-20 06:23 AM
Are we done as soon as we run the cell with name and email? Or do we have to do the submissions somewhere seperately?
Avatar
Anonymous 21-Jul-20 06:24 AM
How to know whether my solution is right or wrong?
Avatar
Anonymous 21-Jul-20 06:25 AM
How to know whether my solution is right or wrong?
@Anonymous they will show you that you're right
Avatar
Anonymous 21-Jul-20 06:33 AM
can anyone help me to complete initialize_qubit function? I can't use initialize function
Avatar
Anonymous 21-Jul-20 06:33 AM
not exactly related to the lab questions but more so some of the starter stuff; when we run the histogram part for the Bell States for a large number of times, say like 10^8, it gives us equal probabilities for both outcomes. This seems intuitive but anyone have a good explanation for this?
Avatar
Anonymous 21-Jul-20 06:35 AM
I have Circuit Error: 'qarg is not a Qubit'
Avatar
Anonymous 21-Jul-20 06:37 AM
@Anonymous Ayyubov Have you looked at the Qiskit documentation for initialization? I found that pretty helpful: https://qiskit.org/documentation/tutorials/circuits/3_summary_of_quantum_operations.html#Arbitrary-initialization
Avatar
Anonymous 21-Jul-20 06:39 AM
@Anonymous Ayyubov Have you looked at the Qiskit documentation for initialization? I found that pretty helpful: https://qiskit.org/documentation/tutorials/circuits/3_summary_of_quantum_operations.html#Arbitrary-initialization
@Anonymous Thank you, I'll check out this
Avatar
Anonymous 21-Jul-20 06:39 AM
Can somebody help me with this..
Avatar
Anonymous 21-Jul-20 06:39 AM
@Anonymous Ayyubov Let me know if you have questions after taking a look 😉
Avatar
Anonymous 21-Jul-20 06:40 AM
@Anonymous Ayyubov Let me know if you have questions after taking a look 😉
@Anonymous sure, thanks for your support
Avatar
Anonymous 21-Jul-20 06:40 AM
@Anonymous you can't use cx or cz with a classical controll bit
use circuit.x(index).c_if(clBit) instead
or just: if clBit: circuit.x(index)
Avatar
Anonymous 21-Jul-20 06:42 AM
We can run this also in vs code? And not necessary in Jupiter notebook
?
Avatar
Anonymous 21-Jul-20 06:46 AM
this youtube channel is very helpful for conceptual understanding: https://www.youtube.com/watch?v=3HiYm9SB-xU&list=PL74Rel4IAsETUwZS_Se_P-fSEyEVQwni7&index=22
👍 1
hope you guys find it useful
Avatar
Anonymous 21-Jul-20 06:49 AM
>
or just: if clBit: circuit.x(index) @Anonymous Thanks
👍 1
Avatar
Anonymous 21-Jul-20 06:49 AM
could u let me know how can i correct this?
Avatar
Anonymous 21-Jul-20 06:51 AM
cx and cz gates should be c_if
refer text book
Avatar
Anonymous 21-Jul-20 06:52 AM
use circuit.x(index).c_if(clBit)
Try this version
Avatar
Anonymous 21-Jul-20 06:53 AM
could u let me know how can i correct this?
@Anonymous You seem to be missing running some cell. Thus the plot_histogram function is not defined. Run all previous cell in the notebook, or add from qiskit.visualization import plot_histogram to this one (edited)
Avatar
Anonymous 21-Jul-20 06:55 AM
use circuit.x(index).c_if(clBit)
* .c_if(clBit, value)
Avatar
Anonymous 21-Jul-20 06:55 AM
thank u will try this @Anonymous Schmitt
@Anonymous Schmitt i am not able to do the initialisation part
Avatar
Anonymous 21-Jul-20 06:58 AM
What is blocking you exactly ?
Avatar
Anonymous 21-Jul-20 07:02 AM
Hi! Can someone teach me how to read this?Statevector([0.70710678+0.j, 0. +0.j, 0. +0.j, 0.70710678+0.j], dims=(2, 2)) (which is the bell state from |00> but couldnt read that...) Thx!!
Avatar
Anonymous 21-Jul-20 07:03 AM
the order of numbers in the array: amplitude of |00>, amplitude of |01>, amplitude of |10>, amplitude of |11>
where qubit 0 is the rightmost qubit
so amplitudes of |00> and |11> are 0.707+0j, where j is the complex i
Avatar
Anonymous 21-Jul-20 07:04 AM
May I close my window after this shows or I have to wait to submit at some other place?
Avatar
Anonymous 21-Jul-20 07:04 AM
and 0.707 is 1/sqrt(2)
Avatar
Anonymous 21-Jul-20 07:06 AM
@Anonymous Thank you! It makes sense now to me! Btw what do you mean by "qubit 0 is the rightmost qubit"?
Avatar
Anonymous 21-Jul-20 07:06 AM
@Anonymous that's all good to close, congrats!
Avatar
Anonymous 21-Jul-20 07:07 AM
@Anonymous the state |01> means 0 for qubit 1 and 1 for qubit 0
Avatar
Anonymous 21-Jul-20 07:09 AM
1 for qubit 2 ,I think
Sorry by the way to interrupt
Avatar
Anonymous 21-Jul-20 07:09 AM
1 for qubit 0 🙂
this is the point
the qubits are ordered from right to left, and their enumeration starts from 0
this ordering is specific to Qiskit (and some other platforms), it's the other direction in textbooks
Avatar
Anonymous 21-Jul-20 07:11 AM
@Anonymous but why in the book they read it like qubit 1 ,qubit 2, qubit 3 like that?
Avatar
Anonymous 21-Jul-20 07:11 AM
which book, where?
Avatar
Anonymous 21-Jul-20 07:12 AM
Chuang
David mccmahon
Even in some video lectures also I have seen that
Avatar
Anonymous 21-Jul-20 07:12 AM
this ordering is specific to Qiskit (and some other platforms), it's the other direction in textbooks
Avatar
Anonymous 21-Jul-20 07:13 AM
Ok
Avatar
Anonymous 21-Jul-20 07:13 AM
I mean Qiskit doesn't use the conventional ordering
Avatar
Anonymous 21-Jul-20 07:13 AM
Oooo
What is the difference between correlation and entanglement?
Avatar
Anonymous 21-Jul-20 07:13 AM
@Anonymous I see! Thank you so much!!😆
Avatar
Anonymous 21-Jul-20 07:21 AM
A university quantum algorithms/computation course supplement based on Qiskit
Avatar
Anonymous 21-Jul-20 07:22 AM
can somebody explain me the relationship between the initialzied quantum state (qubit1) and the functions (gates) that we then execute on them? This question is more concerned with the documentation of the qiskit framework. I still can't really interperet the types the different functions take as input. Thanks a lot.
Avatar
Anonymous 21-Jul-20 07:32 AM
How do you change email? @Anonymous I found deleting the answers.enc file (or whatever it's called) worked
I guess I also restarted the kernel
Avatar
Anonymous 21-Jul-20 07:33 AM
for lab sessions , will the official solutions of the exercises be posted somewhere?
Avatar
Anonymous 21-Jul-20 07:35 AM
@Anonymous yes you might have used wrong email once and executed the cell.\
Avatar
Anonymous 21-Jul-20 07:35 AM
Yea that's true
Avatar
Anonymous 21-Jul-20 07:39 AM
why are we applying a cnot before h gate when making a bell measurement between alice's q0 and q1 cause it brings bout no change in the statevector
@Anonymous When you want to measure a state in other than z-basis, you need to rotate the z-basis to the basis that you want to measure the state on. In this case, you want to measure the state on the bell basis, you need to do inverse transform which makes the bell state |0>. Therefore, you apply the gates you need for the bell state in reverse order, which is first apply cnot and then H.
Avatar
Anonymous 21-Jul-20 07:39 AM
can someone please guid me on how to intilialize the quantum states?I'm completely new to qiskit
I'm facing a lot of problem in working on the lab assignments
Avatar
Anonymous 21-Jul-20 07:41 AM
@Anonymous Kang yeah i was only taking a singular case of |0> at q0 and hence was getting same output with or without the cnot
👍 1
i got it wrong there
Avatar
Anonymous 21-Jul-20 07:41 AM
@Anonymous Dev Singh The section about arbitrary initialization helps https://qiskit.org/documentation/tutorials/circuits/3_summary_of_quantum_operations.html
Avatar
Anonymous 21-Jul-20 07:45 AM
how to deal with this?
Avatar
Anonymous 21-Jul-20 07:46 AM
thank you @Anonymous ..also will we get any official solutions for the lab exercises?
👍 1
Avatar
Anonymous 21-Jul-20 07:48 AM
exceeded retries?
anyone else encountering this when trying to submit for grading?
Avatar
Anonymous 21-Jul-20 07:49 AM
I'm facing a lot of problem in working on the lab assignments
@Anonymous Dev Singh
Avatar
Anonymous 21-Jul-20 07:50 AM
@Anonymous Dev Singh I think so, in the timetable says "1:30 PM : Previous Day Lab Work Solution Posted in Discord"
Avatar
Anonymous 21-Jul-20 07:51 AM
@Anonymous please check your internet connection
Avatar
Anonymous 21-Jul-20 07:53 AM
thanks 😅 . slow connection made me a bit paranoid
Avatar
Anonymous 21-Jul-20 07:58 AM
While solving assignments, I faced a problem: gc.measure(qubit,clbit) works for me but gc.measure([qubit1,qubit2],[clbit1,clbit2]) throws an error! (edited)
Can anyone suggest the possible source of error?
Avatar
Anonymous 21-Jul-20 08:01 AM
@Anonymous you have to make one measurement at a time
measure one qubit, then the another
Avatar
Anonymous 21-Jul-20 08:02 AM
May I close my window after this shows or I have to wait to submit at some other place?
@Anonymous You're done 🙂 Congratulations!
Avatar
Anonymous 21-Jul-20 08:03 AM
@Anonymous Why can't I measure both as in the example provided in the notebook?
Avatar
Anonymous 21-Jul-20 08:04 AM
@Anonymous That is how the measurement function in qiskit works, https://qiskit.org/documentation/stubs/qiskit.circuit.QuantumCircuit.measure.html
it expects one qubit and one bit
Avatar
Anonymous 21-Jul-20 08:06 AM
how to submit lab exercise 1?
Avatar
Anonymous 21-Jul-20 08:06 AM
@Anonymous the documentation also allows for the input in a list/tuple format as well. They have used the list form of input in different examples of the document elsewhere too.
Avatar
Anonymous 21-Jul-20 08:07 AM
@Anonymous you are right, I couldn't use the list/tuple format either
but one measurement after other works
Avatar
Anonymous 21-Jul-20 08:08 AM
how to submit lab exercise 1?
@Anonymous Girma by running the last cell in the notebook provided to us.
@Anonymous you are right, I couldn't use the list/tuple format either
@Anonymous absolutely! I'm wondering as to any installation issues of Qiskit on my device! 🤷‍♂️
Should we ask any mentor ?
While solving assignments, I faced a problem: gc.measure(qubit,clbit) works for me but gc.measure([qubit1,qubit2],[clbit1,clbit2]) throws an error!
@Anonymous @Anonymous
Avatar
Anonymous 21-Jul-20 08:18 AM
@Anonymous please help @Anonymous .
Avatar
Anonymous 21-Jul-20 08:22 AM
#crangi Measurements of multiple qubits is supported. What is the error message that you get?
Avatar
Anonymous 21-Jul-20 08:25 AM
Hi, by when do we have to submit the lab work?
Avatar
Anonymous 21-Jul-20 08:26 AM
Hi, by when do we have to submit the lab work?
@Anonymous Morolia 31st July
👍 2
Avatar
Anonymous 21-Jul-20 08:28 AM
When i open jupyter notebook from my anaconda prompt I can run "import qiskit" with no errors. But when i use the 'jupyter notebook' command on my terminal and to open the ex1 file from lab1, it says no module named 'qiskit' when i run the second cell. (I first get into my new_environment before issuing commands in terminal). Did anyone else run into this error? (edited)
Avatar
Anonymous 21-Jul-20 08:31 AM
#crangi Measurements of multiple qubits is supported. What is the error message that you get?
@Anonymous I actually figured out. It was throwing an error handling of [creg1,creg2]. I tried to index for first element and it worked!
Is it a feature that measure accepts classical register if it's one entry but a list requires us to index the registries for first entry?
Is it a feature that measure accepts classical register if it's one entry but a list requires us to index the registries for first entry?
@Anonymous @Anonymous
Avatar
Anonymous 21-Jul-20 08:32 AM
I don't know
Avatar
Anonymous 21-Jul-20 08:33 AM
Okay! Thanks @Anonymous and @Anonymous
Avatar
Anonymous 21-Jul-20 08:37 AM
Today exactly when will yesterday's lab solutions be posted?
Avatar
Anonymous 21-Jul-20 08:39 AM
Today exactly when will yesterday's lab solutions be posted?
@Anonymous 1.30pm I believe
Avatar
Anonymous 21-Jul-20 08:39 AM
Alright!
Avatar
Anonymous 21-Jul-20 08:40 AM
Can anyone clear this up with regards to Qiskit ordering: If I prepare a state using sv = Statevector.from_label('ab') sv.data Then it will give me the state |ab>, but if I go to run it through a circuit, it will send the state 'b' to the 1st qubit (q0) and the state 'a' to the 2nd qubit (q1). So if I want to generate a Bell state |psi_ij>, I essentially want to prepare sv = Statevector.from_label('ji') given the protocol described in the lectures. Is this correct?
Avatar
Anonymous 21-Jul-20 08:42 AM
Can anyone clear this up with regards to Qiskit ordering: If I prepare a state using sv = Statevector.from_label('ab') sv.data Then it will give me the state |ab>, but if I go to run it through a circuit, it will send the state 'b' to the 1st qubit (q0) and the state 'a' to the 2nd qubit (q1). So if I want to generate a Bell state |psi_ij>, I essentially want to prepare sv = Statevector.from_label('ji') given the protocol described in the lectures. Is this correct?
@Anonymous Holden-Dye Hi, initially even I was too confused with this. In qiksit ordering is : |q2q1q0>---|010>
👍 3
Avatar
Anonymous 21-Jul-20 08:43 AM
@Anonymous Holden-Dye Hi, initially even I was too confused with this. In qiksit ordering is : |q2q1q0>---|010>
@Anonymous Great, thanks
Avatar
Anonymous 21-Jul-20 08:44 AM
@Anonymous write the code for measuring the qubits separately
Avatar
Anonymous 21-Jul-20 08:44 AM
@Anonymous Holden-Dye You can check the pic
Avatar
Anonymous 21-Jul-20 08:44 AM
@Anonymous Asfaw @Anonymous Once I get this, is there any additional step towards submission, or is it already done? (edited)
Avatar
Anonymous 21-Jul-20 08:45 AM
@Anonymous you are done!!!!! Congrats
Avatar
Anonymous 21-Jul-20 08:46 AM
@Anonymous you are done!!!!! Congrats
@Anonymous OK... Thanks!
Avatar
Anonymous 21-Jul-20 08:50 AM
I am new to QC and the lab exercise showed more shortcomings from my end.. have not been able to complete the activity.. Will move ahead based on the solutions posted
Avatar
Anonymous 21-Jul-20 08:50 AM
can somebody send the solutions for the ungraded exercises?
would like to check mine
Avatar
Anonymous 21-Jul-20 08:50 AM
In the command mycircuit.draw('mpl'), what does 'mpl' represent?
Avatar
Anonymous 21-Jul-20 08:51 AM
In the command mycircuit.draw('mpl'), what does 'mpl' represent?
@Anonymous matplotlib, I think.
💯 3
Avatar
Anonymous 21-Jul-20 08:52 AM
@Anonymous matplotlib, I think.
@Anonymous Thanks 🙂
Avatar
Anonymous 21-Jul-20 08:53 AM
@Anonymous you could just do it yourself by taking the tensor product and adding or subtracting them as required and comparing with the values you got
Avatar
Anonymous 21-Jul-20 08:53 AM
@Anonymous write the code for measuring the qubits separately
@Anonymous yup! I worked out both ways now! I also figured using lists.
Avatar
Anonymous 21-Jul-20 08:55 AM
@Anonymous you could just do it yourself by taking the tensor product and adding or subtracting them as required and comparing with the values you got
@Anonymous true, ill go for that
Avatar
Anonymous 21-Jul-20 08:57 AM
could u let me know how can i correct this?
@Anonymous maybe you haven't downloaded the qiskit-visualization module yet
Avatar
Anonymous 21-Jul-20 08:59 AM
i don't think we need to download it separately. @Anonymous
Avatar
Anonymous 21-Jul-20 09:01 AM
is it essential to submit lab exercises for each day? or we have time until the end of the summer school?
Avatar
Anonymous 21-Jul-20 09:01 AM
You will have until the end
But it would be good practice if you did the labs each day
Avatar
Anonymous 21-Jul-20 09:02 AM
@Anonymous thanks
i agree, but i missed yesterday
Avatar
Anonymous 21-Jul-20 09:03 AM
I can help you if you have any questions
Avatar
Anonymous 21-Jul-20 09:05 AM
oh thank you. i will try it myself and get back soon.
Avatar
Anonymous 21-Jul-20 09:08 AM
is it essential to submit lab exercises for each day? or we have time until the end of the summer school?
@Anonymous I would say at least try to work on them at daily basis. Although we have deadline set as 7/31, the number of unfinished assignment will increase daily regardless and the more assignment we clear the more we learn. Have fun 🙂 (edited)
👍 1
Avatar
Anonymous 21-Jul-20 09:10 AM
thanks for ur suggestion.
Avatar
Anonymous 21-Jul-20 09:18 AM
test
Avatar
Anonymous 21-Jul-20 09:27 AM
Hand written lecture notes of each day available guys??
Avatar
Anonymous 21-Jul-20 09:28 AM
can anyone tell me what's wrong with my circuit? I'm confused about the entanglement function..
Avatar
Anonymous 21-Jul-20 09:31 AM
can anyone tell me what's wrong with my circuit? I'm confused about the entanglement function..
@Anonymous You miss the bell measurements part
After you entangle both qubits, simply add CNOT gate on both Alice's qubits, and add H Gate on qubit1_Alice
Avatar
Anonymous 21-Jul-20 09:33 AM
Avatar
Anonymous 21-Jul-20 09:34 AM
where can i watch the recorded lab session?
Avatar
Anonymous 21-Jul-20 09:34 AM
After you entangle both qubits, simply add CNOT gate on both Alice's qubits, and add H Gate on qubit1_Alice
@Anonymous ohh I missed it! thanks!
Avatar
Anonymous 21-Jul-20 09:37 AM
No problem! @Anonymous 👌🏼
Avatar
Anonymous 21-Jul-20 09:40 AM
Is there a way to add a file to my IBMQ account, I want to add lab1 file to work on it, because Qiskit could not be prperly.
Avatar
Anonymous 21-Jul-20 09:59 AM
Is there a way to add a file to my IBMQ account, I want to add lab1 file to work on it, because Qiskit could not be prperly.
@Anonymous It is exactly this reason (because of the difficulties to reconstruct file dependencies on IBMQ) we are suggested not to use cloud to work in this camp
Avatar
Anonymous 21-Jul-20 10:05 AM
okay now I have this circuit and it's still not the right one..what am I doing wrong? 😕
Avatar
Anonymous 21-Jul-20 10:06 AM
@Anonymous (Wen-Sen) unfortunatlly Qiskit could not be installed properly in my d (winitows 10), it's been a long time struglling installing it but with no result.
Avatar
Anonymous 21-Jul-20 10:10 AM
okay now I have this circuit and it's still not the right one..what am I doing wrong? 😕
@Anonymous in the state preparation, you only had an X gate applied? Why is that (edited)
Avatar
Anonymous 21-Jul-20 10:12 AM
@Anonymous our initial state need to be α = √ 0.70 and β = √0.30
Avatar
Anonymous 21-Jul-20 10:12 AM
Lab recordings where to find them
Avatar
Anonymous 21-Jul-20 10:13 AM
@Anonymous use the .initialize(state, index)
👍 1
Avatar
Anonymous 21-Jul-20 10:13 AM
@Anonymous use the same link
Avatar
Anonymous 21-Jul-20 10:21 AM
Hi, I need help please. My output says circuit is incorrect. Can someone help identify it
Avatar
Anonymous 21-Jul-20 10:23 AM
You are missing the bell state
👍 2
Avatar
Anonymous 21-Jul-20 10:23 AM
@Anonymous You need to implement a Bell state measurment on q2_0 and q2_1. As you have implemented, you are performing a simple z measurement. Try applying a H gate and CX gate to q2_0 and q2_1 to pull them out of the Bell state and into your measurement basis
➕ 1
Avatar
Anonymous 21-Jul-20 10:26 AM
@Anonymous @Anonymous S Thanks for replying!! I am still completely new to this and just following the textbook to code. What I did was given_circuit.cx(qubit_Alice,qubit_Bob) given_circuit.h(qubit_Alice)
@Anonymous @Anonymous S Do I need apply those gates to bobs qubit as well
Avatar
Anonymous 21-Jul-20 10:28 AM
@Anonymous No you are very close and only missing two gates. One CX gate between q2_0 and q2_1, and one H gate to q2_0. (edited)
👍 2
Avatar
Anonymous 21-Jul-20 10:28 AM
@Anonymous quoting from the textbook "In quantum circuit language, the way to create a Bell pair between two qubits is to first transfer one of them to the X-basis ( |+⟩ and |−⟩ ) using a Hadamard gate, and then to apply a CNOT gate onto the other qubit controlled by the one in the X-basis."
👍 2
Avatar
Anonymous 21-Jul-20 10:35 AM
I have finished lab1 and submitted the correct answer. However, I am having trouble visualizing my quantum circuit. This seems strange even if I try to apply barriers..
Avatar
Anonymous 21-Jul-20 10:37 AM
use circuit.draw(output='text')
Avatar
Anonymous 21-Jul-20 10:55 AM
@Anonymous Thanks for you reply! This is the result of print(circuit.draw(output='text') as written in the code.. Am I missing something..?
Avatar
Anonymous 21-Jul-20 10:55 AM
try plain print(circuit)
Avatar
Anonymous 21-Jul-20 10:55 AM
when will we get the solutions??
Avatar
Anonymous 21-Jul-20 11:03 AM
when will we get the solutions??
@Anonymous 1:30 pm EST
Avatar
Anonymous 21-Jul-20 11:10 AM
Hi I finished lab apparently. Thanks to awesome help I got here. Does that mean submission is taken care of and I don't need to do anything else
Avatar
Anonymous 21-Jul-20 11:10 AM
Yep, you're all set 😄
😆 4
Avatar
Anonymous 21-Jul-20 11:12 AM
I think you have not performed the bell measurement after creating the entanglement
Avatar
Anonymous 21-Jul-20 11:13 AM
ModuleNotFoundError: Any thoughts about: ModuleNotFoundError: No module named 'qiskit_textbook' .
Avatar
Anonymous 21-Jul-20 11:14 AM
Thanks to everyone who helped!😀
🥳 3
Avatar
Anonymous 21-Jul-20 11:33 AM
is there a reason why i can import qiskit when i open my own jupyter notebook. But, when i open the ex1 file as a jupyter notebook from terminal it says it cannot find my qiskit module? (edited)
Avatar
Anonymous 21-Jul-20 11:34 AM
ModuleNotFoundError: Any thoughts about: ModuleNotFoundError: No module named 'qiskit_textbook' .
@Anonymous Are you running locally?
Avatar
Anonymous 21-Jul-20 11:48 AM
Can we access Elisa’s jupyter notebooks she shows in the lectures?
Avatar
Anonymous 21-Jul-20 11:49 AM
A university quantum algorithms/computation course supplement based on Qiskit
Avatar
Anonymous 21-Jul-20 11:49 AM
Thank you
Avatar
Anonymous 21-Jul-20 11:50 AM
Here's the link for the earlier one: https://qiskit.org/textbook/ch-algorithms/deutsch-josza.html You have the option to download as a notebook on the right side.
A university quantum algorithms/computation course supplement based on Qiskit
Avatar
Anonymous 21-Jul-20 11:51 AM
Thanks 😄
Avatar
Anonymous 21-Jul-20 11:51 AM
permission denied
Avatar
Anonymous 21-Jul-20 11:53 AM
@Anonymous can you tell me how to entangle states in qiskit...I am facing problems in yesterday's exercise
Avatar
Anonymous 21-Jul-20 11:54 AM
@Anonymous I am not able to import qiskit_textbook.widgets (edited)
I keep getting ModuleNotFoundError: No module named 'qiskit_textbook'
Is the textbook not installed with qiskit or has it been deprecated?
Avatar
Anonymous 21-Jul-20 11:56 AM
@Anonymous I am not able to import qiskit_textbook.widgets
@Anonymous In your resources folder, is the a folder named qiskit_textbook?
Avatar
Anonymous 21-Jul-20 11:57 AM
Is the textbook not installed with qiskit or has it been deprecated?
@Anonymous https://github.com/qiskit-community/qiskit-textbook#installing-the-qiskit_textbook-package
👍 1
Avatar
Anonymous 21-Jul-20 11:57 AM
@Anonymous where do i find the resources folder?
@Anonymous Thanks!
Avatar
Anonymous 21-Jul-20 11:58 AM
@Anonymous where do i find the resources folder?
@Anonymous this should be your directory, where ex1 is the file you're working with
@Anonymous this should be your directory, where ex1 is the file you're working with
@Anonymous When you open resources, these should be inside (edited)
Avatar
Anonymous 21-Jul-20 12:02 PM
@Anonymous It worked!
👍 1
Thanks @Anonymous
Avatar
Anonymous 21-Jul-20 12:03 PM
Hello, I just got notification "lab1/ex1 - correct" WITHOUT "Hurray! You have a new correct answer! Let's submit it...". How should I submit it?
Avatar
Anonymous 21-Jul-20 12:04 PM
@Anonymous Kristiano thats already done. You just need an internet connection
Avatar
Anonymous 21-Jul-20 12:07 PM
ok
Avatar
Anonymous 21-Jul-20 12:10 PM
@Anonymous Kristiano first change ur answer and submit , it will show failed and then again undo the answer and submit. It will work
Avatar
Anonymous 21-Jul-20 12:26 PM
Does anyone know how the labs are graded? Is correct 100%?
Avatar
Anonymous 21-Jul-20 12:28 PM
Does anyone know how the labs are graded? Is correct 100%?
@Anonymous Lew credit or no credit
as far as I know
Avatar
Anonymous 21-Jul-20 12:28 PM
Thank you! (:
Avatar
Anonymous 21-Jul-20 12:39 PM
What about todays lab session?
Avatar
Anonymous 21-Jul-20 12:42 PM
I think those are being posted soon^
Avatar
Anonymous 21-Jul-20 12:54 PM
What does ⊕ mean?
Avatar
Anonymous 21-Jul-20 12:55 PM
What does ⊕ mean?
@Anonymous Lam Addition modulo 2.
Avatar
Anonymous 21-Jul-20 12:55 PM
Ah ok
Thanks
😁 1
Avatar
Anonymous 21-Jul-20 01:01 PM
Where the lab information will be posted?
Avatar
Anonymous 21-Jul-20 01:01 PM
@Anonymous under the #lab-exercises channel (edited)
Avatar
Anonymous 21-Jul-20 01:01 PM
yaya lab time'
Avatar
Anonymous 21-Jul-20 01:02 PM
The profile color change from red to green
Avatar
Anonymous 21-Jul-20 01:04 PM
koi?
Avatar
Anonymous 21-Jul-20 01:04 PM
please, what's wrong with this solution? I keep getting 0%
Avatar
Anonymous 21-Jul-20 01:04 PM
@Anonymous Mazumder nei 👀
Avatar
Anonymous 21-Jul-20 01:05 PM
@Anonymous the order of conditionals is reversed
Avatar
Anonymous 21-Jul-20 01:05 PM
sorry for typo...ignore
Avatar
Anonymous 21-Jul-20 01:06 PM
no labs today? did they already post the link to the labs?
Avatar
Anonymous 21-Jul-20 01:06 PM
patience patience
Avatar
Anonymous 21-Jul-20 01:06 PM
no labs today? did they already post the link to the labs?
@Anonymous I think it is not posted yet.
Avatar
Anonymous 21-Jul-20 01:07 PM
There are no gates at the end
Avatar
Anonymous 21-Jul-20 01:07 PM
I see... Thanks @Anonymous
Avatar
Anonymous 21-Jul-20 01:07 PM
@Anonymous Mazumder keu bujhte parchena tor kotha 😄
Avatar
Anonymous 21-Jul-20 01:07 PM
please, what's wrong with this solution? I keep getting 0%
@Anonymous Your conditions are on the wrong bit
Avatar
Anonymous 21-Jul-20 01:08 PM
@Anonymous you use the wrong classical bits for the conditionals
Avatar
Anonymous 21-Jul-20 01:09 PM
I change it and still gives filure
Avatar
Anonymous 21-Jul-20 01:10 PM
Now you have it in the wrong order
Avatar
Anonymous 21-Jul-20 01:10 PM
@Anonymous gates were in correct order do not change them
Avatar
Anonymous 21-Jul-20 01:10 PM
im not sure if your initialization method is quite correct
👍 1
Avatar
Anonymous 21-Jul-20 01:10 PM
@Anonymous could mark as spoiler
Avatar
Anonymous 21-Jul-20 01:10 PM
also second x gate is reversed
Avatar
Anonymous 21-Jul-20 01:10 PM
I'm rotating with 2 arccos(sqrt(0.7))
Avatar
Anonymous 21-Jul-20 01:11 PM
@Anonymous rotating is fine!
Avatar
Anonymous 21-Jul-20 01:11 PM
lab2 in #lab-exercises
Avatar
Anonymous 21-Jul-20 01:11 PM
I think the order of the conditionals should not matter, or?
Avatar
Anonymous 21-Jul-20 01:11 PM
@Anonymous X goes first but is controlled by the 2nd register
Avatar
Anonymous 21-Jul-20 01:11 PM
What should I do If I get "ModuleNotFoundError: No module named 'qiskit_textbook' "
Avatar
Anonymous 21-Jul-20 01:12 PM
Lab 2 is in!
Avatar
Anonymous 21-Jul-20 01:12 PM
For lab1 I'm only getting this response. Is that it?
Avatar
Anonymous 21-Jul-20 01:12 PM
there is just one lab right
Avatar
Anonymous 21-Jul-20 01:12 PM
What about yesterday lab work solution? Is it posted?
Avatar
Anonymous 21-Jul-20 01:13 PM
as in there is no question of deutsch
Avatar
Anonymous 21-Jul-20 01:13 PM
Whats wrong with this??
Avatar
Anonymous 21-Jul-20 01:13 PM
The link is not working for lab instruction
👍 2
Avatar
Anonymous 21-Jul-20 01:13 PM
Whats wrong with this??
@Anonymous take the measurement in the bell state
Avatar
Anonymous 21-Jul-20 01:16 PM
always failure, I'm starting to think they want me to initialize the way they like it.
Avatar
Anonymous 21-Jul-20 01:17 PM
Is the lab link opening rightly?
Avatar
Anonymous 21-Jul-20 01:17 PM
@Anonymous can u please elaborate ?? .. i am really new and cannot find the fault
Avatar
Anonymous 21-Jul-20 01:18 PM
DNS error
Avatar
Anonymous 21-Jul-20 01:18 PM
cant find the error?
Avatar
Anonymous 21-Jul-20 01:18 PM
are you facing same for lab?
Avatar
Anonymous 21-Jul-20 01:18 PM
yes
eroor 1016
Avatar
Anonymous 21-Jul-20 01:18 PM
Yeah same here!
Avatar
Anonymous 21-Jul-20 01:19 PM
Can someone help me in initializing qiskiit in lab 1
Avatar
Anonymous 21-Jul-20 01:19 PM
cant find the error?
@Anonymous https://qiskit.org/textbook/ch-algorithms/teleportation.html#simulating please refer to this
A university quantum algorithms/computation course supplement based on Qiskit
Avatar
Anonymous 21-Jul-20 01:20 PM
eroor 1016
@Anonymous Are you referring to the crowdcast link for the instructions?
Avatar
Anonymous 21-Jul-20 01:20 PM
yes
Avatar
Anonymous 21-Jul-20 01:20 PM
getting DNS error for the lab instruction Error 1016
Avatar
Anonymous 21-Jul-20 01:20 PM
I dont know how to start
Avatar
Anonymous 21-Jul-20 01:22 PM
I too am getting DNS error
Can't watch the video
Avatar
Anonymous 21-Jul-20 01:27 PM
the error has ben resolved
👍 1
check now
Avatar
Anonymous 21-Jul-20 01:28 PM
always failure, I'm starting to think they want me to initialize the way they like it.
@Anonymous yeah, try initializing the state directly instead of applying the Ry gate, the error could just be a rounding issue in the 1.1593 argument
Avatar
Anonymous 21-Jul-20 01:28 PM
how many times can we submit our solution?
Avatar
Anonymous 21-Jul-20 01:29 PM
how many times can we submit our solution?
@Anonymous inf
Avatar
Anonymous 21-Jul-20 01:29 PM
cool thanks
Avatar
Anonymous 21-Jul-20 01:30 PM
just to clarify, when are the labs due? I thought it was in a pinned message but I lost it
Avatar
Anonymous 21-Jul-20 01:30 PM
31th
Avatar
Anonymous 21-Jul-20 01:31 PM
thank you!
Avatar
Anonymous 21-Jul-20 01:35 PM
The Hitchhiker's Guide reference in Lab 2 is pretty neat!
👍 2
Avatar
Anonymous 21-Jul-20 01:35 PM
lmao i know i loved it
Avatar
Anonymous 21-Jul-20 01:36 PM
@Anonymous Asfaw Just wanted to confirm that the file qgss_grader_outputs.pdf can be in the parent directory of the individual lab folders.
Avatar
Anonymous 21-Jul-20 01:36 PM
that pdf if just fyi
it is not required for the exercises
👍 1
Avatar
Anonymous 21-Jul-20 01:38 PM
it is not required for the exercises
@Anonymous Copy that 😉
Avatar
Anonymous 21-Jul-20 01:41 PM
Still not getting after fixing the the bell measurement need help ??
Avatar
Anonymous 21-Jul-20 01:42 PM
Your initial state looks incorrect
Avatar
Anonymous 21-Jul-20 01:43 PM
Still not getting after fixing the the bell measurement need help ??
@Anonymous initialization seems wrong, the initial stateonly has real coefficiants
Avatar
Anonymous 21-Jul-20 01:46 PM
I changed the initial state still ran into error?
Avatar
Anonymous 21-Jul-20 01:47 PM
For lab 2, there is a step that requires no modification, but is giving an error message: File "<ipython-input-6-a7c0f35859a0>", line 8 print(f'{n} qubits, basis states {indices_of_marked_elements} marked, {r} rounds') ^ SyntaxError: invalid syntax
Avatar
Anonymous 21-Jul-20 01:51 PM
@Anonymous Asfaw so I see that your positing the lab solutions. I thought we had until the 31st July to submit all our lab work in order to gain a certificate. Is this not the case ?
Avatar
Anonymous 21-Jul-20 01:54 PM
Avatar
Anonymous 21-Jul-20 01:55 PM
@Anonymous I think the certificate is given regardless if you find the solution on your own, more of acknowledgment of completion
Avatar
Anonymous 21-Jul-20 01:56 PM
>
@Anonymous Asfaw so I see that your positing the lab solutions. I thought we had until the 31st July to submit all our lab work in order to gain a certificate. Is this not the case ? @Anonymous Nothing has changed. As long as you submit before the 31st and meet the required grade, you'll be able to get a certificate. The solutions are there to help you. To get the best out of the exercises, try and waiting till the last moment before checking them out 🙂
(edited)
Avatar
Anonymous 21-Jul-20 01:56 PM
>
I changed the initial state still ran into error? @Anonymous I think that the c_if operations are swaped on your circuit.
Avatar
Anonymous 21-Jul-20 01:56 PM
@Anonymous pay attention which classical register controls which gate
Avatar
Anonymous 21-Jul-20 01:57 PM
I'm just getting correct, not the entire submitted, correct like yesterday, any help??
Avatar
Anonymous 21-Jul-20 01:58 PM
@Anonymous Co thanks for clarifying on the labs. Yes I want to try them first myself 👍
Avatar
Anonymous 21-Jul-20 01:58 PM
thx you guys finally
Avatar
Anonymous 21-Jul-20 01:58 PM
I'm just getting correct, not the entire submitted, correct like yesterday, any help??
@Anonymous probably bc you already submitted a correct answer, they probably doing this to prevent ddosing the server? If you delete the answers.enc, and then rerun everything should see what you are hoping for (edited)
Avatar
Anonymous 21-Jul-20 01:59 PM
Hey guys, how do I submit my lab ex1? I ran the cells using shift + enter but nothing happened!
Avatar
Anonymous 21-Jul-20 01:59 PM
It may still be running
Avatar
Anonymous 21-Jul-20 01:59 PM
@Anonymous I haven't made a complete correct submission for lab2, it's correct only on my local machine
Avatar
Anonymous 21-Jul-20 02:00 PM
If it looks like this In [*] it is still running
Avatar
Anonymous 21-Jul-20 02:00 PM
Oh alright thanks
It may still be running
@Anonymous yeah I see the [*] thanks
👍 1
Avatar
Anonymous 21-Jul-20 02:00 PM
@Anonymous I haven't made a complete correct submission for lab2, it's correct only on my local machine
@Anonymous if you are confident abt ur answer why not delete the answers.enc file and rerun everything?
Avatar
Anonymous 21-Jul-20 02:00 PM
what is the biggest part we are being graded on?
Just read that the lab sessions are not entirely for grading
Avatar
Anonymous 21-Jul-20 02:01 PM
@Anonymous this would be helpful for you to initialized the state https://qiskit.org/documentation/stubs/qiskit.circuit.QuantumCircuit.initialize.html
Avatar
Anonymous 21-Jul-20 02:01 PM
@Anonymous if you are confident abt ur answer why not delete the answers.enc file and rerun everything?
@Anonymous how we do that??
Avatar
Anonymous 21-Jul-20 02:02 PM
@Anonymous how we do that??
@Anonymous goto folder grading_tools, should see answers.enc , delete that, restart the kernel and run everything (edited)
Avatar
Anonymous 21-Jul-20 02:03 PM
@Anonymous ya got the file
Let's see if it works
@Anonymous no its throwing some keyerror
Avatar
Anonymous 21-Jul-20 02:06 PM
@Anonymous no its throwing some keyerror
@Anonymous what does it say if I may ask?
Avatar
Anonymous 21-Jul-20 02:07 PM
'is_update' keyerror
Avatar
Anonymous 21-Jul-20 02:07 PM
@Anonymous What algorithm does the transpiler use to decompose the unitary matrix into single-qubit and cx gates?
Avatar
Anonymous 21-Jul-20 02:07 PM
'is_update' keyerror
@Anonymous same here
Avatar
Anonymous 21-Jul-20 02:07 PM
'is_update' keyerror
@Anonymous me too
what does it mean?
Avatar
Anonymous 21-Jul-20 02:08 PM
When I try to submit lab2 exercise, I get this error.. Any help is appreciated. (edited)
Avatar
Anonymous 21-Jul-20 02:08 PM
Same here!
Avatar
Anonymous 21-Jul-20 02:08 PM
@Anonymous same here too
Avatar
Anonymous 21-Jul-20 02:08 PM
@Anonymous what does it mean we have 'is_update' as an error in the grade part?
Avatar
Anonymous 21-Jul-20 02:08 PM
@Anonymous is something wrong with the grading tools?
Avatar
Anonymous 21-Jul-20 02:08 PM
I guess
Avatar
Anonymous 21-Jul-20 02:09 PM
Same error for me on is_update
Avatar
Anonymous 21-Jul-20 02:09 PM
You guys are all facing the same issue with the new lab exercise?
Avatar
Anonymous 21-Jul-20 02:09 PM
yes
Avatar
Anonymous 21-Jul-20 02:09 PM
Ye @Anonymous
Avatar
Anonymous 21-Jul-20 02:09 PM
@Anonymous have you tried restarting the kernel?
Avatar
Anonymous 21-Jul-20 02:10 PM
@Anonymous Will try now. :))
Avatar
Anonymous 21-Jul-20 02:13 PM
restarting the kernel leads to the same error 'is_update'
Avatar
Anonymous 21-Jul-20 02:13 PM
It seems more a code problem. Anybody managed to grade his code for lab2?
Avatar
Anonymous 21-Jul-20 02:13 PM
It seems more a code problem. Anybody managed to grade his code for lab2?
@Anonymous Picca worked fine with me
Avatar
Anonymous 21-Jul-20 02:13 PM
Yep, same here.
restarting the kernel leads to the same error 'is_update'
@Anonymous
Avatar
Anonymous 21-Jul-20 02:14 PM
When I try to submit lab2 exercise, I get this error.. Any help is appreciated.
@Anonymous yeah same error as this
Avatar
Anonymous 21-Jul-20 02:14 PM
KeyError: 'is_update'
Avatar
Anonymous 21-Jul-20 02:14 PM
@Anonymous ok thanks for the feedback!
Avatar
Anonymous 21-Jul-20 02:14 PM
okay I will do that
Avatar
Anonymous 21-Jul-20 02:14 PM
@Anonymous it worked, thanks a lot
👍 1
Avatar
Anonymous 21-Jul-20 02:15 PM
@Anonymous If you're around, would you help us please? :))
Avatar
Anonymous 21-Jul-20 02:17 PM
Yep, same here. @Anonymous
@Anonymous see if answers.enc is present in the grading_tools folder, if it is, delete it and restart the kernel and rerun all the code?
Avatar
Anonymous 21-Jul-20 02:17 PM
delete what is inside or the file?
Avatar
Anonymous 21-Jul-20 02:18 PM
I don’t have that file
Avatar
Anonymous 21-Jul-20 02:18 PM
@Anonymous see if answers.enc is present in the grading_tools folder, if it is, delete it and restart the kernel and rerun all the code?
@Anonymous I have the same error and that file does not appear on my folder
Avatar
Anonymous 21-Jul-20 02:18 PM
When I try to submit lab2 exercise, I get this error.. Any help is appreciated.
@Anonymous same here
Avatar
Anonymous 21-Jul-20 02:18 PM
Do you think it is an issue with the compatibility of our answers with that of an "answer key" of some sort?
@Anonymous see if answers.enc is present in the grading_tools folder, if it is, delete it and restart the kernel and rerun all the code?
@Anonymous
Avatar
Anonymous 21-Jul-20 02:19 PM
@Anonymous @Anonymous let me dig a little deeper into the grade.py
Avatar
Anonymous 21-Jul-20 02:19 PM
And as with others, I don't have that file either..
@Anonymous @Anonymous let me dig a little deeper into the grade.py
@Anonymous Cheers, mate!
Avatar
Anonymous 21-Jul-20 02:20 PM
Do you think it is an issue with the compatibility of our answers with that of an "answer key" of some sort? @Anonymous
@Anonymous The thing is that it does not mark an error on our answers, the error is marked on one of the lines that we should not change, the ones that save our answers i think
👍 1
Avatar
Anonymous 21-Jul-20 02:20 PM
@Anonymous Deleting answers.enc file dind't solve the issue 😦
Avatar
Anonymous 21-Jul-20 02:21 PM
Oh well, it's quarter past 2 in the morning here in Singapore. If any of the mentors/someone else manages to help while I'm snoring away, can someone @ me so I can debug when I'm up? :))
👍 1
Avatar
Anonymous 21-Jul-20 02:21 PM
KeyError: 'is_update'
Found any solution for this?
‼️ 2
Avatar
Anonymous 21-Jul-20 02:21 PM
I am also getting KeyError: 'is_update'
‼️ 2
Avatar
Anonymous 21-Jul-20 02:21 PM
@Anonymous The thing is that it does not mark an error on our answers, the error is marked on one of the lines that we should not change, the ones that save our answers i think
@Anonymous Ah, I see.
Avatar
Anonymous 21-Jul-20 02:21 PM
0.497, 0.503? that's right?
Avatar
Anonymous 21-Jul-20 02:22 PM
0.497, 0.503? that's right?
@Anonymous It's probabilistic. If you run it again it will give you a different answer. What's important is to check if these are in the correct values (1 and 42)
Avatar
Anonymous 21-Jul-20 02:22 PM
anybody solved the lab ? just for motivation !
Avatar
Anonymous 21-Jul-20 02:22 PM
0.497, 0.503? that's right?
@Anonymous It can vary because you are doing a simulation, the important thing is that you have near 50/50 chance on both values that you are working on
Avatar
Anonymous 21-Jul-20 02:23 PM
well,
@Anonymous It's probabilistic. If you run it again it will give you a different answer. What's important is to check if these are in the correct values (1 and 42)
@Anonymous well there are, 000001 and 101010 and those are 1 and 42
so it's right?
Avatar
Anonymous 21-Jul-20 02:23 PM
so it's right?
@Anonymous yep
Avatar
Anonymous 21-Jul-20 02:23 PM
cool, thanks
Avatar
Anonymous 21-Jul-20 02:23 PM
There is a post to the server in the grade.py and its response should return a json with that key “is_update”... maybe some problems there?
Avatar
Anonymous 21-Jul-20 02:23 PM
I'm doing what @Anonymous said in order to see if the grade problem is solved
Avatar
Anonymous 21-Jul-20 02:24 PM
anybody solved the lab ? just for motivation !
@Anonymous I have, but there's a technical issue with the grader
Avatar
Anonymous 21-Jul-20 02:24 PM
me tooo
the same problem
Avatar
Anonymous 21-Jul-20 02:25 PM
There is a post to the server in the grade.py and its response should return a json with that key “is_update”... maybe some problems there?
@Anonymous Picca same problem
Avatar
Anonymous 21-Jul-20 02:25 PM
Yeah it was a bit slow compared to the last lab but try restarting the kernel and submit again
Avatar
Anonymous 21-Jul-20 02:25 PM
for those who see keyerror for is_update what is your qiskit version?
Avatar
Anonymous 21-Jul-20 02:26 PM
0.19.6?
Avatar
Anonymous 21-Jul-20 02:26 PM
0.19.6
Avatar
Anonymous 21-Jul-20 02:26 PM
0.19.0
Avatar
Anonymous 21-Jul-20 02:27 PM
It should be the one in the requirements.txt
0.19.0
Avatar
Anonymous 21-Jul-20 02:27 PM
0.19.6
Avatar
Anonymous 21-Jul-20 02:27 PM
Mine is 0.14.0, but got "is update" error too
Avatar
Anonymous 21-Jul-20 02:27 PM
hey guys
the problem was solved
look
Avatar
Anonymous 21-Jul-20 02:27 PM
did you guys change the code u are not supposed to?
Avatar
Anonymous 21-Jul-20 02:27 PM
no (edited)
Avatar
Anonymous 21-Jul-20 02:28 PM
I deleted the file answer.dc that is in grading
then i closed ex1
and open it again
Avatar
Anonymous 21-Jul-20 02:28 PM
I deleted the file answer.dc that is in grading
@Anonymous answers.enc
Avatar
Anonymous 21-Jul-20 02:28 PM
not just restart the kernel but close the ex1
@Anonymous answers.enc
@Anonymous thanks ahaha that
Avatar
Anonymous 21-Jul-20 02:28 PM
@Anonymous
Avatar
Anonymous 21-Jul-20 02:28 PM
open it again and then run everything
👍 3
Avatar
Anonymous 21-Jul-20 02:30 PM
open it again and then run everything
@Anonymous I thought I see someone who did not even have the answers.enc and still get this error
Avatar
Anonymous 21-Jul-20 02:31 PM
@Anonymous I thought I see someone who did not even have the answers.enc and still get this error
@Anonymous And that's me
Avatar
Anonymous 21-Jul-20 02:31 PM
Me too
Avatar
Anonymous 21-Jul-20 02:31 PM
@Anonymous And that's me
@Anonymous show us what do you have there
Avatar
Anonymous 21-Jul-20 02:31 PM
I get the 'is_update' error but I do not have the answers file to delete and try again
Avatar
Anonymous 21-Jul-20 02:32 PM
I get the 'is_update' error but I do not have the answers file to delete and try again
@Anonymous Like mentioned above , try closing and opening the notebook again...
Avatar
Anonymous 21-Jul-20 02:32 PM
@Anonymous
There is no such file even in pycache
Avatar
Anonymous 21-Jul-20 02:33 PM
pycache is a folder
Avatar
Anonymous 21-Jul-20 02:33 PM
@Anonymous same here
Avatar
Anonymous 21-Jul-20 02:33 PM
Restarted kernel, closed file, nothing
Avatar
Anonymous 21-Jul-20 02:33 PM
@Anonymous
@Anonymous I also don't have the file and I'm getting the is_update error
Avatar
Anonymous 21-Jul-20 02:33 PM
pycache is created while running the files
Avatar
Anonymous 21-Jul-20 02:33 PM
restarted jupyter and kernel, deleted file and cache, same error
Avatar
Anonymous 21-Jul-20 02:34 PM
restarted jupyter and kernel, deleted file and cache, same error
@Anonymous same
Avatar
Anonymous 21-Jul-20 02:34 PM
@Anonymous same
@Anonymous Picca same
Avatar
Anonymous 21-Jul-20 02:34 PM
all you have 0.19.0 qiskit?
maybe is the qiskit
idk
Avatar
Anonymous 21-Jul-20 02:34 PM
Don't want to jinx anyone, but is it possible that the error is for wrong circuits only?
@Anonymous nope, same problem for 0.19.0 and 0.14.0
Avatar
Anonymous 21-Jul-20 02:35 PM
Don't want to jinx anyone, but is it possible that the error is for wrong circuits only?
@Anonymous I'm getting the correct values as answers in the histogram, so I don't think that's the issue
Avatar
Anonymous 21-Jul-20 02:35 PM
I get approx 50/50 on 1 and 42 in bitstrings so I think the circuit is ok
Avatar
Anonymous 21-Jul-20 02:36 PM
Fairly sure I have the right circuit but I'm also getting this error as well
Avatar
Anonymous 21-Jul-20 02:36 PM
Don't want to jinx anyone, but is it possible that the error is for wrong circuits only?
@Anonymous Its no that because it does not grade
Avatar
Anonymous 21-Jul-20 02:36 PM
@Anonymous I also checked 0.19.0 and 0.14.0, both same error
Avatar
Anonymous 21-Jul-20 02:36 PM
Check the email and name...and give the same name and email you gave in the last lab
Avatar
Anonymous 21-Jul-20 02:36 PM
Check the email and name...and give the same name and email you gave in the last lab
@Anonymous Anand I've done that, not the issue here
Whoever is having the is_update error, react to this message just so we can have an idea of how many people are having this problem
👍 13
Avatar
Anonymous 21-Jul-20 02:37 PM
Could it be your python version?
the answer is from request.post.json() perhaps your python version is too old ? (edited)
Avatar
Anonymous 21-Jul-20 02:37 PM
Just close and open the notebook, it fixed the error in my case
Avatar
Anonymous 21-Jul-20 02:37 PM
Found the solution for it
Avatar
Anonymous 21-Jul-20 02:38 PM
Shouldn't "keyerror" in python means that the key is not in the dictionary?
Avatar
Anonymous 21-Jul-20 02:38 PM
Can anyone help with the phase oracle?
Avatar
Anonymous 21-Jul-20 02:38 PM
Just close and open the notebook, it fixed the error in my case
@Anonymous didn't work for me
Avatar
Anonymous 21-Jul-20 02:38 PM
Can anyone help with the phase oracle?
@Anonymous Check the lecture from earlier today, Elisa has done it there
Avatar
Anonymous 21-Jul-20 02:38 PM
Shouldn't "keyerror" in python means that the key is not in the dictionary?
@Anonymous yeah, and the dictionary is returned from the send_request() . I thought it could be with your python version? (edited)
Avatar
Anonymous 21-Jul-20 02:38 PM
Error: Key_Error: is_update 1. Delete the pycache folder from the directory 2. Restart the kernel 3. Done
👍 1
Avatar
Anonymous 21-Jul-20 02:39 PM
Error: Key_Error: is_update
>
1. Delete the pycache folder from the directory 2. Restart the kernel 3. Done
@Anonymous I have tried but it didn’t work. I will try again thanks
Avatar
Anonymous 21-Jul-20 02:40 PM
@Anonymous Picca Worked for me, try again
👍 1
Avatar
Anonymous 21-Jul-20 02:41 PM
Error: Key_Error: is_update
>
1. Delete the pycache folder from the directory 2. Restart the kernel 3. Done
@Anonymous Tried it here, but it didn't work
Avatar
Anonymous 21-Jul-20 02:41 PM
can we compare the python version number for those whose code worked and whose did not
Avatar
Anonymous 21-Jul-20 02:41 PM
@Anonymous
@Anonymous Hey! Thanks for the @Anonymous Closing the notebook and recompiling now. Any luck on your end?
😁 1
Avatar
Anonymous 21-Jul-20 02:42 PM
@Anonymous I also tried again, didn't work
Avatar
Anonymous 21-Jul-20 02:42 PM
@Anonymous same here
Avatar
Anonymous 21-Jul-20 02:42 PM
I am working on lab 1 - can anyone tell what is wrong with this below? -
Avatar
Anonymous 21-Jul-20 02:42 PM
@Anonymous Picca Worked for me, try again
@Anonymous Didn't work for me 😦
Avatar
Anonymous 21-Jul-20 02:42 PM
def initialize_qubit(given_circuit, qubit_index): import numpy as np vec = np.array([np.complex(np.sqrt(0.7),0.0), \ np.complex(np.sqrt(0.3),0.0)]) given_circuit.initialize(vec,qubit_index) return given_circuit
Avatar
Anonymous 21-Jul-20 02:42 PM
same errors (im pretty sure i got the right solution too)
Avatar
Anonymous 21-Jul-20 02:42 PM
It doesn’t work for me
Avatar
Anonymous 21-Jul-20 02:42 PM
to check if it works on a single qubit
q=QuantumRegister(1) circuit = QuantumCircuit(q) initialize_qubit(circuit,0) sv=Statevector.from_label('0') sv=sv.evolve(circuit)
Avatar
Anonymous 21-Jul-20 02:42 PM
maybe its time out issues? too many people trying and it randomly works
Avatar
Anonymous 21-Jul-20 02:42 PM
it throws the error QiskitError: 'Cannot apply Instruction: reset'
Avatar
Anonymous 21-Jul-20 02:43 PM
So.. reopening the notebook and running it didn't help. Same error as before. -.-
Avatar
Anonymous 21-Jul-20 02:43 PM
@Anonymous Check the lecture from earlier today, Elisa has done it there
@Anonymous In the notes?
Avatar
Anonymous 21-Jul-20 02:43 PM
@Anonymous In the notes?
@Anonymous no, on the crowdcast
Avatar
Anonymous 21-Jul-20 02:43 PM
@Anonymous In the notes?
@Anonymous In the video itself. The link is in #lab-exercises
Avatar
Anonymous 21-Jul-20 02:43 PM
Have you guys tried downloading the zipped file again ?
Avatar
Anonymous BOT 21-Jul-20 02:43 PM
Your hand has been raised! A mentor will drop in as soon as they are available.
Avatar
Anonymous 21-Jul-20 02:44 PM
can we compare the python version number for those whose code worked and whose did not
@Anonymous Python 3.7.6 and getting the error
Avatar
Anonymous 21-Jul-20 02:44 PM
Have you guys tried downloading the zipped file again ?
@Anonymous Anand yep didn't work 😦
Avatar
Anonymous 21-Jul-20 02:44 PM
Is someone working on grover's algorithm? I'm having the following problem: "name 'oracle_matrix' is not defined"
Avatar
Anonymous 21-Jul-20 02:44 PM
My python version is 3.8.2 and it worked
Avatar
Anonymous 21-Jul-20 02:44 PM
@Anonymous I have tried but it didn’t work. I will try again thanks
@Anonymous Picca Still doe not work for me
Avatar
Anonymous 21-Jul-20 02:44 PM
Is someone working on grover's algorithm? I'm having the following problem: "name 'oracle_matrix' is not defined"
@Anonymous you have to define it
👍 1
Avatar
Anonymous 21-Jul-20 02:44 PM
Hi , who to create a oracle_matrix in lab 2??
Avatar
Anonymous 21-Jul-20 02:44 PM
Is someone working on grover's algorithm? I'm having the following problem: "name 'oracle_matrix' is not defined"
@Anonymous You probably named your matrix diferent that oracle_matrix
👍 2
Avatar
Anonymous 21-Jul-20 02:44 PM
@Anonymous In the video itself. The link is in #lab-exercises
@Anonymous Cool thanks
Avatar
Anonymous 21-Jul-20 02:45 PM
python 3.6.9, didn't work
Avatar
Anonymous 21-Jul-20 02:45 PM
try update python ?
Avatar
Anonymous 21-Jul-20 02:45 PM
Hi , who to create a oracle_matrix in lab 2??
Avatar
Anonymous 21-Jul-20 02:45 PM
python 3.6.9, didn't work
@Anonymous try updating python
Avatar
Anonymous 21-Jul-20 02:45 PM
will try
Avatar
Anonymous 21-Jul-20 02:45 PM
thanks @Anonymous Preis and @Anonymous
Avatar
Anonymous 21-Jul-20 02:46 PM
@Anonymous In the video itself. The link is in #lab-exercises
@Anonymous Any idea of the timestamp?
Avatar
Anonymous 21-Jul-20 02:47 PM
It worked eventually and I was just restarting kernels, it is a bug for sure
Avatar
Anonymous 21-Jul-20 02:47 PM
submited
Avatar
Anonymous 21-Jul-20 02:47 PM
@Anonymous Any idea of the timestamp?
@Anonymous It was near the end, after she explained the theory on the algorithm. Look for whenever she has a Jupyter notebook open
Avatar
Anonymous 21-Jul-20 02:47 PM
actually i ve done nothing !
Avatar
Anonymous 21-Jul-20 02:47 PM
@Anonymous It was near the end, after she explained the theory on the algorithm. Look for whenever she has a Jupyter notebook open
@Anonymous Ayt cool
👍 1
Avatar
Anonymous 21-Jul-20 02:48 PM
actually i ve done nothing !
@Anonymous yeah, something was wrong with the session
Avatar
Anonymous 21-Jul-20 02:48 PM
as it seemd (because i've read the grading py file) a timeout may have caused the issue
👍 3
the answer send by the grading server is not in the expected formate
format*
Avatar
Anonymous 21-Jul-20 02:49 PM
who to create the oracle_matrix
Avatar
Anonymous 21-Jul-20 02:49 PM
so try again that's it
Avatar
Anonymous 21-Jul-20 02:49 PM
@Anonymous You probably named your matrix diferent that oracle_matrix
@Anonymous Didi you run the first cell?
Avatar
Anonymous 21-Jul-20 02:49 PM
oracle_matrix = np.identity(2**n) for i in indices_to_mark: oracle_matrix[i,indices_to_mark]=indices_to_mark-1
Avatar
Anonymous 21-Jul-20 02:49 PM
@Anonymous It was near the end, after she explained the theory on the algorithm. Look for whenever she has a Jupyter notebook open
@Anonymous Found it👍
🥳 1
Avatar
Anonymous 21-Jul-20 02:49 PM
who to create the oracle_matrix
@Anonymous look in the lecture video from earlier today
Avatar
Anonymous 21-Jul-20 02:49 PM
is this so??
Avatar
Anonymous 21-Jul-20 02:49 PM
who to create the oracle_matrix
@Anonymous https://numpy.org/doc/1.18/reference/generated/numpy.matrix.html
Avatar
Anonymous 21-Jul-20 02:50 PM
as it seemd (because i've read the grading py file) a timeout may have caused the issue
@Anonymous It makes sense, i think i will try a little bit later, thanks!
☺️ 1
Avatar
Anonymous 21-Jul-20 02:51 PM
The oracle should be Uf=X⁶(C⁵X)X⁶ ?
Avatar
Anonymous 21-Jul-20 02:51 PM
i think it's quite possible that the server is overloaded when everyone try to send in their result.. at first it didn't work for me (deleting pycache, restarting kernel and jupyter didnt help either).. then i created another cell with just the grade(..) command inside, which worked, then it failed again when i tried to rerun the grade(..) command
👍 5
Avatar
Anonymous 21-Jul-20 02:51 PM
In the Lab2 The oracle should be Uf=X⁶(C⁵X)X⁶ ?
for n=6
Avatar
Anonymous 21-Jul-20 02:53 PM
Im getting this error: NotImplementedError: Not able to generate a subcircuit for a 6-qubit unitary
Avatar
Anonymous 21-Jul-20 02:55 PM
@Anonymous please look into the matter of keyerror 'is_update'
👍 5
Avatar
Anonymous 21-Jul-20 02:55 PM
did you generate teh oracle using a numpy array or did anyone try to implement it with elementary gates?
Avatar
Anonymous 21-Jul-20 02:56 PM
did you generate teh oracle using a numpy array or did anyone try to implement it with elementary gates?
@Anonymous Preis Numpy array
Avatar
Anonymous 21-Jul-20 02:56 PM
@Anonymous Preis Numpy array
@Anonymous me too
Im getting this error: NotImplementedError: Not able to generate a subcircuit for a 6-qubit unitary
@Anonymous did you use an append with 2 arguments?
Avatar
Anonymous 21-Jul-20 02:58 PM
@Anonymous did you use an append with 2 arguments?
@Anonymous Preis Yep
Avatar
Anonymous 21-Jul-20 02:58 PM
try update python ?
@Anonymous just update it, but the issue is still there
Avatar
Anonymous 21-Jul-20 02:58 PM
the error 'is_update' changed for me, now is "400 Client Error: Bad Request for url: https://eu-gb.functions.cloud.ibm.com/api/v1/web/salvador.de.la.puente.gonzalez%40ibm.com_dev/default/qgss_grading/validate-answer"
overloaded server?
Avatar
Anonymous 21-Jul-20 02:59 PM
Whats the issue with KeyError: 'is_update' ?
did everything
Avatar
Anonymous 21-Jul-20 02:59 PM
the error 'is_update' changed for me, now is "400 Client Error: Bad Request for url: https://eu-gb.functions.cloud.ibm.com/api/v1/web/salvador.de.la.puente.gonzalez%40ibm.com_dev/default/qgss_grading/validate-answer"
@Anonymous It really seems that @Anonymous theory of server overload is correct
💯 3
Avatar
Anonymous 21-Jul-20 02:59 PM
@Anonymous It really seems that @Anonymous theory of server overload is correct
@Anonymous same thing for me
Avatar
Anonymous 21-Jul-20 03:00 PM
@Anonymous just update it, but the issue is still there
@Anonymous the other guys think it might be the server is overloaded. so perhaps wait for a while and try?
Avatar
Anonymous 21-Jul-20 03:00 PM
Whats the issue with KeyError: 'is_update' ?
@Anonymous A lot of people are getting it. It seems to be server overload. Restarting kernel, closing the notebook, updating python, deleting pycache folder, nothing solved it. (edited)
Avatar
Anonymous 21-Jul-20 03:01 PM
ubisoft, dinner tonight is potatoes (edited)
😆 3
Avatar
Anonymous 21-Jul-20 03:01 PM
@Anonymous the other guys think it might be the server is overloaded. so perhaps wait for a while and try?
@Anonymous Sure. It seems I've already tried all available options for now lol
Avatar
Anonymous 21-Jul-20 03:01 PM
@Anonymous A lot of people are getting it. It seems to be server overload. Restarting kernel, closing the notebook, updating python, deleting pycache folder, nothing solved it. It seems to be server overload
@Anonymous same i did exactly everything
Avatar
Anonymous 21-Jul-20 03:01 PM
answer={'code': 'b70a672c5b7bd7fd9b7f5a778ca4b1c4', 'error': 'Response not yet ready.'}
Avatar
Anonymous 21-Jul-20 03:02 PM
For those facing the KeyError: is_update I'm not sure if this might work for everyone but I moved the grade function to another cell I guess this could reduce the time and I deleted the pycache folder and it worked (edited)
Avatar
Anonymous 21-Jul-20 03:02 PM
but why ?
Avatar
Anonymous 21-Jul-20 03:02 PM
@Anonymous Help needed!!
xD
Avatar
Anonymous 21-Jul-20 03:03 PM
For those facing the KeyError: is_update I'm not sure if this might work for everyone but I moved the grade function to another cell I guess this could reduce the time and I deleted the pycache folder and it worked
@Anonymous Good idea. I'll try it here
Avatar
Anonymous 21-Jul-20 03:03 PM
@Anonymous Help needed!!
@Anonymous can you give more information?
Avatar
Anonymous 21-Jul-20 03:03 PM
@Anonymous can you give more information?
@Anonymous A lot of people are getting KeyError: is_update when submitting today's lab exercise
Avatar
Anonymous 21-Jul-20 03:04 PM
@Anonymous can you give more information?
@Anonymous seems like too many users submitting answer to the server, request.post() is not returning a dictionary that has the value "is_update"
Avatar
Anonymous 21-Jul-20 03:04 PM
@Anonymous I was able to solve the Key Error: is_update by deleting the pycache folder and restarting the kernel but it seems many have getting the same error again and again
@Anonymous seems like too many users submitting answer to the server, request.post() is not returning a dictionary that has the value "is_update"
@Anonymous I think so too
Avatar
Anonymous 21-Jul-20 03:05 PM
yeah, it seems server overload.
Avatar
Anonymous 21-Jul-20 03:05 PM
+1
Avatar
Anonymous 21-Jul-20 03:06 PM
we can write an script that just runs that cell every 5 minutes 😉
😆 6
😂 4
Avatar
Anonymous 21-Jul-20 03:06 PM
Done for the day. ✌🏽
Avatar
Anonymous 21-Jul-20 03:06 PM
@Anonymous Chakrabarti how much time?
for execution?
Avatar
Anonymous 21-Jul-20 03:06 PM
we can write an script that just runs that cell every 5 minutes 😉
@Anonymous this is interesting. I am not very good at coding. Would you consider teaching this?
Avatar
Anonymous 21-Jul-20 03:07 PM
we can write an script that just runs that cell every 5 minutes 😉
@Anonymous please don't 😆
😆 9
😂 8
Avatar
Anonymous 21-Jul-20 03:07 PM
for execution?
@Anonymous took a couple of seconds. Maybe 20-30 seconds
Avatar
Anonymous 21-Jul-20 03:07 PM
just kidding... that would case a more server overload... 😆
Avatar
Anonymous 21-Jul-20 03:07 PM
For those facing the KeyError: is_update I'm not sure if this might work for everyone but I moved the grade function to another cell I guess this could reduce the time and I deleted the pycache folder and it worked
@Anonymous Nope. Didnt solve it
🤔 1
Avatar
Anonymous 21-Jul-20 03:07 PM
@Anonymous if this doesn't get solved will we get alternative method?
Avatar
Anonymous 21-Jul-20 03:08 PM
Hi, I was trying to iterating through indices_to_mark as they said it was a list; however, I got the error said it is int and i cannot iterate. What is the type of 'indices_to_mark'
Avatar
Anonymous 21-Jul-20 03:08 PM
Got it! but just doing it manually
Avatar
Anonymous 21-Jul-20 03:08 PM
@Anonymous Nope. Didnt solve it
@Anonymous I deleted the pycache folder while the notebook was running btw.. I guess this might be some other issue
Avatar
Anonymous 21-Jul-20 03:08 PM
@Anonymous How?
👍 1
Avatar
Anonymous 21-Jul-20 03:09 PM
@Anonymous if this doesn't get solved will we get alternative method?
@Anonymous Ghosh trying to figure out. Maybe retry later. Will come back if I have better answers
Avatar
Anonymous 21-Jul-20 03:09 PM
@Anonymous manual resubmissions xD
Avatar
Anonymous 21-Jul-20 03:09 PM
Ah!
Avatar
Anonymous 21-Jul-20 03:09 PM
@Anonymous manual resubmissions xD
@Anonymous send a pigeon
😂 5
🤣 1
Avatar
Anonymous 21-Jul-20 03:09 PM
hahah
Avatar
Anonymous 21-Jul-20 03:09 PM
🤣
Avatar
Anonymous 21-Jul-20 03:09 PM
@Anonymous How?
@Anonymous manual cell run and eventually it gets pushed to the server
Avatar
Anonymous 21-Jul-20 03:09 PM
Schrodinger's pidgeon will deliver the answer
Avatar
Anonymous 21-Jul-20 03:09 PM
Schrodinger's pidgeon will deliver the answer
@Anonymous Or not!
👍 2
😂 4
Avatar
Anonymous 21-Jul-20 03:10 PM
@Anonymous How?
@Anonymous ssly how did u do this?
Avatar
Anonymous 21-Jul-20 03:10 PM
not sure if pigeons will play nice with Schrodinger, they are monogamous
Avatar
Anonymous 21-Jul-20 03:11 PM
@Anonymous Nope. Didnt solve it
@Anonymous Neither did it for me
Avatar
Anonymous 21-Jul-20 03:11 PM
@Anonymous ssly how did u do this?
@Anonymous the Key_Error it is actually a server error. So, we are many people just sending the results... so, just wait a little and try again
💯 2
Avatar
Anonymous 21-Jul-20 03:11 PM
We need the almighty asfaw among us right now
👍 1
Avatar
Anonymous 21-Jul-20 03:11 PM
@Anonymous Neither did it for me
@Anonymous I tried submitting again it's not working now
Avatar
Anonymous 21-Jul-20 03:11 PM
Lol
Avatar
Anonymous 21-Jul-20 03:11 PM
I guess it's some server issue
Avatar
Anonymous 21-Jul-20 03:12 PM
Downgrading qiksit 0.19.6 to 0.19.0 (plus the other dependencies) did not help for the "KeyError: 'is_update'" - any other hints?
Avatar
Anonymous 21-Jul-20 03:12 PM
Downgrading qiksit 0.19.6 to 0.19.0 (plus the other dependencies) did not help for the "KeyError: 'is_update'" - any other hints?
@Anonymous Server issue. Just wait and try again later
Avatar
Anonymous 21-Jul-20 03:12 PM
@Anonymous it won't, server issue
Avatar
Anonymous 21-Jul-20 03:12 PM
Well, the moderator did mention that they had some internal issues to deal with before sending the solutions for lab1. Maybe this problem is a part of it
Avatar
Anonymous 21-Jul-20 03:12 PM
i guess the best strategy is to sit back and relax try running everything later?
Avatar
Anonymous 21-Jul-20 03:12 PM
OK, thanks.
Avatar
Anonymous 21-Jul-20 03:13 PM
i guess the best strategy is to sit back and relax try running everything later?
@Anonymous for now I would suggest that 🙂 We'll come back once we know what is going on
👍 4
Avatar
Anonymous 21-Jul-20 03:15 PM
i guess the best strategy is to sit back and relax try running everything later?
@Anonymous Well, I'll use this time to read the textbook
💯 1
Avatar
Anonymous 21-Jul-20 03:15 PM
@Anonymous Well, I'll use this time to read the textbook
@Anonymous That is a very good idea!!
💯 1
Avatar
Anonymous 21-Jul-20 03:15 PM
Oh, wait!
Finally got it
Avatar
Anonymous 21-Jul-20 03:16 PM
@Anonymous lucky!
Avatar
Anonymous 21-Jul-20 03:16 PM
Oh, wait!
@Anonymous Any insight you can share what you did differently ?
Avatar
Anonymous 21-Jul-20 03:16 PM
Still going to read the textbook, but I'm glad I got to send it
Avatar
Anonymous 21-Jul-20 03:16 PM
I followed something someone posted and ran the grading tool by itself in a new cell and it worked. It's strange. I tried the written submit cell gain and it failed. IDK if it's random chance on the server or if the two things are related. Going to stop now in case it is caused by load on the server. @Anonymous @Anonymous (edited)
👍 2
Avatar
Anonymous 21-Jul-20 03:16 PM
@Anonymous Any insight you can share what you did differently ?
@Anonymous Just patience lol
Avatar
Anonymous 21-Jul-20 03:17 PM
Just run the last cell multiple time, and finally got success.😋
Avatar
Anonymous 21-Jul-20 03:17 PM
I did put the grade function in a different cell as well
Only ran that single cell in every attempt
Avatar
Anonymous 21-Jul-20 03:19 PM
maybe the transpiled circuit is too big. drawing it takes a minute.
Avatar
Anonymous 21-Jul-20 03:20 PM
To make my oracle I choose H C⁵X H
Can someone tell me what is wrong with this?
Avatar
Anonymous 21-Jul-20 03:22 PM
To make my oracle I choose H C⁵X H
@Anonymous why not follow what the notebook suggested, your circuit should not do anything if initial state is 00000 (edited)
Avatar
Anonymous 21-Jul-20 03:24 PM
Finally my submission got through👍
👍 2
Avatar
Anonymous 21-Jul-20 03:25 PM
maybe the transpiled circuit is too big. drawing it takes a minute.
@Anonymous Preis I think you will understand quicker if you see the last 3 minutes of the lecture session for today. There is what you need
opps
I answer to someone who was not
ahhaha
Avatar
Anonymous 21-Jul-20 03:25 PM
Avatar
Anonymous 21-Jul-20 03:25 PM
@Anonymous
Avatar
Anonymous 21-Jul-20 03:26 PM
I think you’re missing out on the oracle_matrix
Avatar
Anonymous 21-Jul-20 03:26 PM
@Anonymous Preis I think you will understand quicker if you see the last 3 minutes of the lecture session for today. There is what you need
@Anonymous understand quicker what? I'm thinking about the submission problem
Avatar
Anonymous 21-Jul-20 03:27 PM
@Anonymous understand quicker what? I'm thinking about the submission problem
@Anonymous Preis just go check. You’ll be thankful. 😛
😆 1
Avatar
Anonymous 21-Jul-20 03:27 PM
@Anonymous understand quicker what? I'm thinking about the submission problem
@Anonymous Preis sorry I was talking with someone else but I click on you ahhaa
Avatar
Anonymous 21-Jul-20 03:27 PM
@Anonymous Preis sorry I was talking with someone else but I click on you ahhaa
@Anonymous ah, ok! thanks anyways
Avatar
Anonymous 21-Jul-20 03:28 PM
@Anonymous Preis just go check. You’ll be thankful. 😛
@Anonymous Chakrabarti Ahahaha I already summitted, but I had the is update mistake too ahah
Avatar
Anonymous 21-Jul-20 03:28 PM
Ah. Okay. I see.
Avatar
Anonymous 21-Jul-20 03:28 PM
OK, thanks
Avatar
Anonymous 21-Jul-20 03:28 PM
Omg, I answered but I saw it was florian
ajajahahhaha
I hope you guys doing fine!
Til tomorrow!
Avatar
Anonymous 21-Jul-20 03:32 PM
ExtensionError: 'Input matrix is not unitary.'
ExtensionError: 'Input matrix is not unitary.'
@Anonymous what does it mean
Avatar
Anonymous 21-Jul-20 03:35 PM
@Anonymous The matrix you wrote is not a valid quantum gate because it does not have the property MM_dag=I. (edited)
Avatar
Anonymous 21-Jul-20 03:36 PM
is this correct circuit for Grover algo?
Avatar
Anonymous 21-Jul-20 03:37 PM
@Anonymous It will always draw that diagram -- the important part is the implementation of the Oracle and Diffuser boxes.
Avatar
Anonymous 21-Jul-20 03:37 PM
@Anonymous Yep that's what I got. But it can be deceiving. Your output can be incorrect if those diffuser and oracle gates are not defined correctly
Avatar
Anonymous 21-Jul-20 03:37 PM
ohh
Avatar
Anonymous 21-Jul-20 03:37 PM
@Anonymous depends on what you have written inside the methods of diffuser and phase_oracle (edited)
Avatar
Anonymous 21-Jul-20 03:37 PM
is this correct circuit for Grover algo?
@Anonymous I guess
Avatar
Anonymous 21-Jul-20 03:38 PM
Has it been confirmed that the
key error is update
is due to server overload?
Avatar
Anonymous 21-Jul-20 03:39 PM
Has it been confirmed that the
key error is update
is due to server overload?
@Anonymous pretty sure
Avatar
Anonymous 21-Jul-20 03:40 PM
@Anonymous ah, I see
Hopefully it doesn't get worse near the 31st.
Avatar
Anonymous 21-Jul-20 03:41 PM
@Anonymous ah, I see
@Anonymous the 2k number upper limit probably is meaningful
Avatar
Anonymous 21-Jul-20 03:42 PM
It is saying correct
Avatar
Anonymous 21-Jul-20 03:45 PM
is there anything to do with the key error or just wait and try again?
Avatar
Anonymous 21-Jul-20 03:45 PM
😫
Avatar
Anonymous 21-Jul-20 03:47 PM
>
is there anything to do with the key error or just wait and try again? @Anonymous for now wait and relax. People suggested to read the qiskit textbook 🙂
Avatar
Anonymous 21-Jul-20 03:50 PM
@Anonymous okay, thank you! Yeah I already started with the textbook, but as it's 10pm around here I prefer to end the day relaxing😅
Avatar
Anonymous BOT 21-Jul-20 03:51 PM
Your hand has been raised! A mentor will drop in as soon as they are available.
Avatar
Anonymous 21-Jul-20 03:53 PM
😫
@Anonymous see #discussion-reference . server is overloaded. Wait a little bit and try later
Avatar
Anonymous 21-Jul-20 03:54 PM
Thanks @Anonymous
Avatar
Anonymous 21-Jul-20 03:57 PM
Hey, I was getting the 'is_update' error, after waiting a bit, I tried and it worked! Just wait and try again.
👍 3
qiskitsmart 1
Avatar
Anonymous 21-Jul-20 03:58 PM
I too am still getting the 'is_update' error
Avatar
Anonymous 21-Jul-20 04:00 PM
After waiting a while and retrying the grade function it eventually graded my assignment. Just give it a little bit and come back periodically to run it.
Avatar
Anonymous 21-Jul-20 04:01 PM
Do I only need to rerun the grading cell?
Avatar
Anonymous 21-Jul-20 04:02 PM
Yep
Avatar
Anonymous 21-Jul-20 04:02 PM
@Anonymous I only ran the grading cell again and worked
Avatar
Anonymous 21-Jul-20 04:02 PM
Great! Thanks
Avatar
Anonymous 21-Jul-20 04:04 PM
Can someone help me out with the submission? Got an error there NameError: name 'answer' is not defined
Avatar
Anonymous 21-Jul-20 04:05 PM
Hi everyone! I’ve got a question, will be thankful if anyone could help me out. Is there a deadline for submitting each lab? I mean, if I submit all labs after the 25th like, I still have time till the 31st which is technically a deadline, do I still get a certificate?
Avatar
Anonymous 21-Jul-20 04:05 PM
@Anonymous Srivathsan Did you run all the cells?
Avatar
Anonymous 21-Jul-20 04:05 PM
Can someone help me out with the submission? Got an error there NameError: name 'answer' is not defined
@Anonymous Srivathsan Did you change the code in the grading cell?
Avatar
Anonymous 21-Jul-20 04:05 PM
Cuz I didn’t expect solutions to be posted so early
Avatar
Anonymous 21-Jul-20 04:05 PM
@Anonymous Srivathsan Did you run all the cells?
@Anonymous hey, yeah, got it!
👍 1
Avatar
Anonymous 21-Jul-20 04:05 PM
Hi everyone! I’ve got a question, will be thankful if anyone could help me out. Is there a deadline for submitting each lab? I mean, if I submit all labs after the 25th like, I still have time till the 31st which is technically a deadline, do I still get a certificate?
@Anonymous I believe based on this https://discordapp.com/channels/729706617951485954/729709899260362832/735193431529488516 You should still get the certificate!
Avatar
Anonymous 21-Jul-20 04:06 PM
Thanks!
👍 1
Avatar
Anonymous 21-Jul-20 04:09 PM
For those getting the 'is_update' error, I suggest setting optimization level to 3, which will be a shorter circuit and submit that way. Mine worked on the first try after that.
👍 1
Avatar
Anonymous 21-Jul-20 04:09 PM
help please
Avatar
Anonymous 21-Jul-20 04:11 PM
help please
@Anonymous you probably messed up the phase_oracle() did you use np.identity and ......
Avatar
Anonymous 21-Jul-20 04:11 PM
@Anonymous it seems that your oracle_matrix isn't unitary
Avatar
Anonymous 21-Jul-20 04:11 PM
@Anonymous It looks like the matrices you defined as the oracle probably isn't unitary
Avatar
Anonymous 21-Jul-20 04:11 PM
If it only has -1 and 1 as diagonal elements it should be unitary
Avatar
Anonymous 21-Jul-20 04:12 PM
ok im submitting the lab 🙂
lets see how it goes
Avatar
Anonymous 21-Jul-20 04:12 PM
For those getting the 'is_update' error, I suggest setting optimization level to 3, which will be a shorter circuit and submit that way. Mine worked on the first try after that.
@Anonymous yeah, I also suspect the size of the circuit to cause problems.
👍 1
Avatar
Anonymous 21-Jul-20 04:12 PM
@Anonymous That's true, but we can't see whether that's what's there 🙂
Avatar
Anonymous 21-Jul-20 04:13 PM
@Anonymous D Oh I meant to give that as a description of what the matrix should look like. I probably didn't word that very well... 😅
👍 1
Avatar
Anonymous 21-Jul-20 04:13 PM
@Anonymous Can you pin an announcement, saying that the "is_update" key error is due to the server overloaded, so please try to submit the lab later?
👍 3
Avatar
Anonymous 21-Jul-20 04:14 PM
Thanks guys
Avatar
Anonymous 21-Jul-20 04:16 PM
I also tried @Anonymous 's fix. it worked, the optimization level brings the cicuit size down and maybe that helped with the update error (edited)
👍 2
Avatar
Anonymous 21-Jul-20 04:16 PM
Im still getting this error: Not able to generate a subcircuit for a 6-qubit unitary
Avatar
Anonymous 21-Jul-20 04:17 PM
Announcement: "Is_update" is an error from the server being overloaded, please just wait a while and try again
👍 2
😆 1
Pinned a message.
Avatar
Anonymous 21-Jul-20 04:19 PM
finally .... done
Avatar
Anonymous 21-Jul-20 04:20 PM
oof still on lab 1
but im almost there, i think im just doing my bell measurments wrong
Avatar
Anonymous 21-Jul-20 04:23 PM
Im still getting this error: Not able to generate a subcircuit for a 6-qubit unitary
@Anonymous Guys any help on this?
Avatar
Anonymous 21-Jul-20 04:24 PM
For those getting the 'is_update' error, I suggest setting optimization level to 3, which will be a shorter circuit and submit that way. Mine worked on the first try after that.
@Anonymous worked for me
Avatar
Anonymous 21-Jul-20 04:25 PM
but im almost there, i think im just doing my bell measurments wrong
@Anonymous Majboor Hello, how are do doing the measurement?
Avatar
Anonymous 21-Jul-20 04:27 PM
I also tried @Anonymous 's fix. it worked, the optimization level brings the cicuit size down and maybe that helped with the update error
@Anonymous Preis how do you apply an optimization?
Avatar
Anonymous 21-Jul-20 04:27 PM
@Anonymous Preis how do you apply an optimization?
@Anonymous in transpile there is an option called optimization_level
Avatar
Anonymous 21-Jul-20 04:28 PM
@Anonymous Majboor I made a mistake trying to use the measure function without use the bell measurement
Avatar
Anonymous 21-Jul-20 04:29 PM
@Anonymous Guys any help on this?
@Anonymous I didn't get it too
Avatar
Anonymous 21-Jul-20 04:30 PM
I perform the hamarad gate and then the controled not gate
Avatar
Anonymous 21-Jul-20 04:30 PM
Quirk is an open-source drag-and-drop quantum circuit simulator for exploring and understanding small quantum circuits.
Avatar
Anonymous 21-Jul-20 04:30 PM
but for some reason it says that my circut is wrong i cannot tell why
This seems to have all the correct gates and i perform the measurments
Avatar
Anonymous 21-Jul-20 04:31 PM
Remember the deadline for all labs is July 31st at midnight EDT. If you're struggling today, don't worry. You have time
Avatar
Anonymous 21-Jul-20 04:31 PM
I am sorry, in the lab2 session, I dont understand
is it right to create an identity matrix like that?
Avatar
Anonymous 21-Jul-20 04:32 PM
is it right to create an identity matrix like that?
@Anonymous exponential is **
Avatar
Anonymous 21-Jul-20 04:33 PM
Oh thanks, didnt notice
Avatar
Anonymous 21-Jul-20 04:33 PM
@Anonymous Diz Someone said that you lose grades if you submit after the solutions are posted. Is this true?
Avatar
Anonymous 21-Jul-20 04:34 PM
This seems to have all the correct gates and i perform the measurments @Anonymous Majboor
in fact, you're applying the cx gate with the bob's qubit as control
Avatar
Anonymous 21-Jul-20 04:34 PM
But I mean, I am a bit concerned that I am not using the indices_to_mark input
Avatar
Anonymous 21-Jul-20 04:34 PM
No!!! No one loses grades!
😍 3
@Anonymous Diz Someone said that you lose grades if you submit after the solutions are posted. Is this true?
@Anonymous Grades are able to be earned all the way until 11:59pm EDT on July 31st
Avatar
Anonymous 21-Jul-20 04:34 PM
But I mean, I am a bit concerned that I am not using the indices_to_mark input
@Anonymous because you missed the step of flipping those indices
Avatar
Anonymous 21-Jul-20 04:36 PM
OMG YES
I DID IT
It was .barrier()
which, Chunny, in #python-reference explained might run the gates sequentially.
Avatar
Anonymous 21-Jul-20 04:40 PM
I have a problem, when sending the solution it appears: KeyError: 'is_update"
Avatar
Anonymous 21-Jul-20 04:41 PM
I have a problem, when sending the solution it appears: KeyError: 'is_update"
@Anonymous Olivia LanesToday at 4:17 PM Announcement: "Is_update" is an error from the server being overloaded, please just wait a while and try again
👍 3
Avatar
Anonymous 21-Jul-20 04:42 PM
I have a problem, when sending the solution it appears: KeyError: 'is_update"
@Anonymous scroll up. common error. try optimization_level=3
Avatar
Anonymous 21-Jul-20 04:43 PM
I have the same error, What does it mean?
Avatar
Anonymous 21-Jul-20 04:43 PM
My guess is too much traffic
Avatar
Anonymous 21-Jul-20 04:45 PM
is there a way for me to check if the phase_oracle function only is working?
Avatar
Anonymous 21-Jul-20 04:47 PM
I did not quite understand the oracle U_f0 in the diffusion operator. If I understand correctly, when it acts on |00..0>, I get |00..0>. But why it is written in matrix with the first element equals to -1? I once thought that it should be the first element equals to 1 and the others equal to -1. Could anyone explain this?
Avatar
Anonymous 21-Jul-20 04:48 PM
🙌 1
god bless
this time it just took 4hours
Avatar
Anonymous 21-Jul-20 04:49 PM
this time it just took 4hours
@Anonymous i totally get you here hahaha
Avatar
Anonymous 21-Jul-20 04:50 PM
I did not quite understand the oracle U_f0 in the diffusion operator. If I understand correctly, when it acts on |00..0>, I get |00..0>. But why it is written in matrix with the first element equals to -1? I once thought that it should be the first element equals to 1 and the others equal to -1. Could anyone explain this?
@Anonymous maybe because it‘s just a global phase shift. which minute in the lecture is it?
Avatar
Anonymous 21-Jul-20 04:51 PM
@Anonymous Preis The end of the lecture, when Elisa shows her code on jupyter (edited)
Avatar
Anonymous 21-Jul-20 04:52 PM
@Anonymous i went 9:00 CET am to bed this morning because it took me 19hours for the 1. lab
I don't like to leave things undone
Avatar
Anonymous 21-Jul-20 04:54 PM
>
@Anonymous i went 9:00 CET am to bed this morning because it took me 19hours for the 1. lab @Anonymous Brooooooo damn
Avatar
Anonymous 21-Jul-20 04:55 PM
has been a rough night
hahahaha
Avatar
Anonymous 21-Jul-20 04:56 PM
Now you can take some rest it seems!!
Avatar
Anonymous 21-Jul-20 04:56 PM
It is ok me too
Avatar
Anonymous 21-Jul-20 04:56 PM
>
has been a rough night @Anonymous that's what she said
Avatar
Anonymous 21-Jul-20 04:57 PM
lets be approporitate please
Avatar
Anonymous 21-Jul-20 04:57 PM
right, my bad
Avatar
Anonymous 21-Jul-20 04:57 PM
i have been working on lab one since yesterday when the lecture ended 😂
Avatar
Anonymous 21-Jul-20 04:57 PM
I did not quite understand the oracle U_f0 in the diffusion operator. If I understand correctly, when it acts on |00..0>, I get |00..0>. But why it is written in matrix with the first element equals to -1? I once thought that it should be the first element equals to 1 and the others equal to -1. Could anyone explain this?
@Anonymous Someone else should probably confirm this, but I believe the goal of U_f0 is to flip all of wrong answers relative to the correct answers, so flipping (multiplying -1) to |00..0> and leaving the rest the same is the same as leaving |00..0> the same and flipping the rest (edited)
Avatar
Anonymous 21-Jul-20 04:57 PM
and i only just finished
Avatar
Anonymous 21-Jul-20 04:57 PM
But I need to say If I had gone to bed early yesterday it wouldn't have taken that long
Avatar
Anonymous 21-Jul-20 04:58 PM
Yes. I sleep early yesterday so that i was not tired. It took me about i would say about 15 hours total with rest.
Avatar
Anonymous 21-Jul-20 04:58 PM
@Anonymous Majboor oh yeah I remember we were texting
I haven't been as happy as I was this morning in a long time.
Avatar
Anonymous 21-Jul-20 04:59 PM
Haha I was extacit
Avatar
Anonymous 21-Jul-20 04:59 PM
I hope the learning curve is steep
Avatar
Anonymous 21-Jul-20 04:59 PM
it seems to be
a little upset with myself thouh that i spent 1 hours on .barrier()
but thats part of it 🤷
Avatar
Anonymous 21-Jul-20 05:00 PM
How do i deal with the is_update error?
Avatar
Anonymous 21-Jul-20 05:01 PM
for now Im not that concerned with learning the semantics behind the frameworks
I'm just trying to understand the calculations based on geometry
Avatar
Anonymous 21-Jul-20 05:02 PM
WHY is the Lab 2 still giving the "is-update" Key Error
Any Solutions??
Avatar
Anonymous 21-Jul-20 05:03 PM
I think it's because of server overloading
WHY is the Lab 2 still giving the "is-update" Key Error
@Anonymous
Avatar
Anonymous 21-Jul-20 05:03 PM
Does someone have a link to the qiskit python docs?
Avatar
Anonymous 21-Jul-20 05:03 PM
just don't keep running continuously i guess
Avatar
Anonymous 21-Jul-20 05:04 PM
@Anonymous So what should I do Just wait, or is there some other way for submitting it.
Avatar
Anonymous 21-Jul-20 05:04 PM
and what does the n mean in {0,1}^n
Avatar
Anonymous 21-Jul-20 05:04 PM
Ok aakash
Avatar
Anonymous 21-Jul-20 05:06 PM
@Anonymous Preis The end of the lecture, when Elisa shows her code on jupyter
@Anonymous I'm pretty sure it's convenience. you can multiply any unitary quantum evolution with a global phase (complex number with absolute value = 1) which does not change observables (measurable outcomes).
and what does the n mean in {0,1}^n
@Anonymous Majboor a kind of n-dimensional vectorspace. However, in each coefficient you either have 0 or 1 instead of an R^n, where each coefficient of a vector can be any real number. Eg. the only vectors in {0, 1}^2 are x_1=(0,0), x_2=(0,1), x_3=(1,0), x_4=(1,1)
Avatar
Anonymous 21-Jul-20 05:18 PM
Pinned a message.
Avatar
Anonymous 21-Jul-20 05:19 PM
Was the condition for U(fo) = 0 for |00...0> and 1 otherwise?
U(fo) |X>
Avatar
Anonymous 21-Jul-20 05:37 PM
Pinned a message.
Avatar
Anonymous 21-Jul-20 05:37 PM
oh, okay! thank you!
Avatar
Anonymous 21-Jul-20 05:44 PM
@Anonymous - set optimization_level=3 for the transpiler
👍 3
Avatar
Anonymous 21-Jul-20 06:46 PM
Guys! Where can I find the documentation for the initialize function used in the first lab
Avatar
Anonymous 21-Jul-20 06:47 PM
@Anonymous Here https://qiskit.org/documentation/tutorials/circuits/3_summary_of_quantum_operations.html you can check the arbitrary initialization section
👍 1
Avatar
Anonymous 21-Jul-20 06:53 PM
Thanks!! @Anonymous
👍 1
Avatar
Anonymous 21-Jul-20 07:12 PM
I had a doubt about the deadline for the labs. What are the exact deadlines to submit the notebooks.
Avatar
Anonymous 21-Jul-20 07:15 PM
@Anonymous "The notebooks must be completed and submitted by the end of the Summer School, on July 31 (11:59 PM EDT)"
Avatar
Anonymous 21-Jul-20 07:15 PM
@Anonymous , thanks for the information.
👍 1
Avatar
Anonymous 21-Jul-20 07:17 PM
@Anonymous Majboor a kind of n-dimensional vectorspace. However, in each coefficient you either have 0 or 1 instead of an R^n, where each coefficient of a vector can be any real number. Eg. the only vectors in {0, 1}^2 are x_1=(0,0), x_2=(0,1), x_3=(1,0), x_4=(1,1)
@Anonymous Preis thank you
Avatar
Anonymous 21-Jul-20 07:22 PM
Alright Guys! I might be a little late on this, but how do you submit labs? Like I ran the last cell and it said congrats you have passed. Now do I need to send my notebook to someone?
Avatar
Anonymous 21-Jul-20 07:24 PM
Alright Guys! I might be a little late on this, but how do you submit labs? Like I ran the last cell and it said congrats you have passed. Now do I need to send my notebook to someone?
@Anonymous Nope, you're all set 🙂
👍🏻 1
Avatar
Anonymous 21-Jul-20 07:26 PM
Thanks!! @Anonymous
qiskitsmart 1
👍 1
Avatar
Anonymous 21-Jul-20 07:48 PM
def bell_meas_Alice_qubits(given_circuit, qubit1_Alice, qubit2_Alice, clbit1_Alice, clbit2_Alice): ### WRITE YOUR CODE BETWEEN THESE LINES - START given_circuit.cx(qubit1_Alice, qubit2_Alice) given_circuit.h(qubit1_Alice) given_circuit.measure([qubit1_Alice,qubit2_Alice], [clbit1_Alice, clbit2_Alice]) Can anyone tell me why the measure function is throwing an error. previously they used. mycircuit.measure([0,1], [0,1]). Is it because, the passed parameters are quantum registers and classical registers and not just numbers in a list ?
Avatar
Anonymous 21-Jul-20 07:50 PM
def bell_meas_Alice_qubits(given_circuit, qubit1_Alice, qubit2_Alice, clbit1_Alice, clbit2_Alice): ### WRITE YOUR CODE BETWEEN THESE LINES - START given_circuit.cx(qubit1_Alice, qubit2_Alice) given_circuit.h(qubit1_Alice) given_circuit.measure([qubit1_Alice,qubit2_Alice], [clbit1_Alice, clbit2_Alice]) Can anyone tell me why the measure function is throwing an error. previously they used. mycircuit.measure([0,1], [0,1]). Is it because, the passed parameters are quantum registers and classical registers and not just numbers in a list ?
@Anonymous K. in measure ------ circuit.measure(qubit,classical_bit)
@Anonymous K. in measure ------ circuit.measure(qubit,classical_bit)
@Anonymous mycircuit.measure([0,1], [0,1]) even this is correct
@Anonymous K. Whats the error ?
Avatar
Anonymous 21-Jul-20 07:52 PM
CircuitError: "Type error handling [ClassicalRegister(1, 'c16'), ClassicalRegister(1, 'c17')] (<class 'list'>)"
it throws an error here given_circuit.measure([qubit1_Alice,qubit2_Alice], [clbit1_Alice, clbit2_Alice])
so i was wondering if i give it a list, it cannot be a list of registers
Avatar
Anonymous 21-Jul-20 07:53 PM
CircuitError: "Type error handling [ClassicalRegister(1, 'c16'), ClassicalRegister(1, 'c17')] (<class 'list'>)"
@Anonymous K. those are not registers.
@Anonymous K. those are not registers.
@Anonymous measure we give qubit followed by classical bit
given_circuit.measure([qubit1_Alice,qubit2_Alice], [clbit1_Alice, clbit2_Alice])----- Correct i don't think any error
In grover's oracle, textbook shows CZ gates, but exercise oracle seems to be different. Little confused. Lab 2 (edited)
Avatar
Anonymous 21-Jul-20 07:56 PM
this is from lab 1
Avatar
Anonymous 21-Jul-20 07:57 PM
this is from lab 1
@Anonymous K. lab 2
Avatar
Anonymous 21-Jul-20 07:57 PM
im doing lab 1 now.
Avatar
Anonymous 21-Jul-20 07:58 PM
@Anonymous K. Did you run all the cells again
Avatar
Anonymous 21-Jul-20 07:58 PM
yes
Avatar
Anonymous 21-Jul-20 07:58 PM
yes
@Anonymous K. Still getting the error
Avatar
Anonymous 21-Jul-20 07:58 PM
how did you do the measurements ?
each qubit to cbit alone ?
Avatar
Anonymous 21-Jul-20 07:59 PM
each qubit to cbit alone ?
@Anonymous K. Yep! 🙂
Avatar
Anonymous 21-Jul-20 07:59 PM
how did you do the measurements ?
@Anonymous K.you mentioned is correct qubit, cbit
@Anonymous K. You can try to measure it individual and check-- qc.measure[q0,cbit0] (edited)
Avatar
Anonymous 21-Jul-20 08:00 PM
qc.measure(q0,cbit0)
Avatar
Anonymous 21-Jul-20 08:01 PM
qc.measure(q0,cbit0)
@Anonymous qubit followed by the classical bit Correct ?
Avatar
Anonymous 21-Jul-20 08:01 PM
Yep 🙂
Avatar
Anonymous 21-Jul-20 08:02 PM
yeah, i figured that, but i was just wondering why the other does not work.
thank you
👍 1
Avatar
Anonymous 21-Jul-20 08:02 PM
yeah, i figured that, but i was just wondering why the other does not work.
@Anonymous K. what's working individual measurement ?
Avatar
Anonymous 21-Jul-20 08:03 PM
hmmm
shouldn't there be two classical registers?
like what's the point of measuring both on the same classical register?
Avatar
Anonymous 21-Jul-20 08:03 PM
shouldn't there be two classical registers?
@Anonymous already there are 2 classical bits* (edited)
Avatar
Anonymous 21-Jul-20 08:03 PM
ohhhhhhhhhhh
is that what the double lines are?
wait no double lines are just classical registers
Avatar
Anonymous 21-Jul-20 08:04 PM
is that what the double lines are?
@Anonymous given_circuit.measure([qubit1_Alice,qubit2_Alice], [clbit1_Alice, clbit2_Alice])----- clbit1_Alice is classical bit (edited)
Avatar
Anonymous 21-Jul-20 08:05 PM
wait i think i know why that line will not work
Avatar
Anonymous 21-Jul-20 08:05 PM
@Anonymous in the diagram circuit is created with 2 qubits and 2 classical bits
Avatar
Anonymous 21-Jul-20 08:05 PM
yeah
so in the diagram above,
that classical register has 2 spots
Avatar
Anonymous 21-Jul-20 08:06 PM
so in the diagram above,
@Anonymous qubits are single line
Avatar
Anonymous 21-Jul-20 08:06 PM
but in the quantum teleportation spot, it's one each
Avatar
Anonymous 21-Jul-20 08:06 PM
classical bits are double line
Avatar
Anonymous 21-Jul-20 08:06 PM
@Anonymous yes the individual one is working
👍 1
Avatar
Anonymous 21-Jul-20 08:07 PM
on the last line / 2 it means there are 2 classical bits
Avatar
Anonymous 21-Jul-20 08:07 PM
classical bits are double line
@Anonymous basically it's going out of bound
Avatar
Anonymous 21-Jul-20 08:07 PM
@Anonymous yes the individual one is working
@Anonymous K. but other one should also work ?
Avatar
Anonymous 21-Jul-20 08:07 PM
because that [0,1] is only referring to one classical register with 2 spots
lol idk 😂
Avatar
Anonymous 21-Jul-20 08:08 PM
measure([0,1],[0,1])----- 1 st arg is for qubits , 2 nd arg is for clbits
lol idk 😂
@Anonymous what ?
Avatar
Anonymous 21-Jul-20 08:09 PM
@Anonymous what ?
@Anonymous oh i was taking a guess as to why that line doesn't work in the quantum teleportation example
Avatar
Anonymous 21-Jul-20 08:13 PM
I think i got it. @Anonymous K. and @Anonymous in teleportation there are 2 different classical registers. Therefore you can't measure([0,1],[0,1]) and we have to measure it individual.It would be nice if @Anonymous can confirm.
Avatar
Anonymous 21-Jul-20 08:14 PM
^Yep, that's what I meant 🙂
Avatar
Anonymous 21-Jul-20 08:14 PM
Bingo 😉
this mentor confirms @Anonymous
qiskitwhite 2
Avatar
Anonymous 21-Jul-20 08:14 PM
this mentor confirms @Anonymous
@Anonymous Asfaw Thanks. Fundamentals /Basics very imp 🙂
💯 1
Avatar
Anonymous 21-Jul-20 08:14 PM
KeyError: 'is_update' on the submission cell of lab 2. Same even when optimization level was changed to 3. Does anyone know the solution?
Avatar
Anonymous 21-Jul-20 08:15 PM
It seems to be related to the servers being busy because so many are using, I would strongly recommend trying a little later. I know this has worked for others.
Abiola can you post screenshot of full error (not just partial)
Avatar
Anonymous 21-Jul-20 08:16 PM
In grover's oracle, textbook shows CZ gates, but lab exercise oracle seems to be different. Little confused. To some extent trying to understand due to the reference notes.But, got confused with textbook oracle part. I know oracle can be implemented in diff ways. (edited)
😆 1
Avatar
Anonymous 21-Jul-20 08:17 PM
So, in the lab, you built the oracle using a matrix directly, In the textbook, we show you how to apply the oracle using gates
👍 2
Avatar
Anonymous 21-Jul-20 08:18 PM
@Anonymous Ohhhhh gotcha, so had we created a classicalRegister(2) like we did for allice then that should have worked ?
Avatar
Anonymous 21-Jul-20 08:18 PM
At the end of the day, you have already seen enough material to know why CZ gates are involved. Remember, these oracles in Grover are simply applying -1s in the matrix. So it's not surprising to see Z gates involved since Z|1> = -1*|1>
👍 2
Z_gate 1
Avatar
Anonymous 21-Jul-20 08:18 PM
So, in the lab, you built the oracle using a matrix directly, In the textbook, we show you how to apply the oracle using gates
@Anonymous Asfaw ok Thanks .
At the end of the day, you have already seen enough material to know why CZ gates are involved. Remember, these oracles in Grover are simply applying -1s in the matrix. So it's not surprising to see Z gates involved since Z|1> = -1*|1>
@Anonymous Asfaw While reading i got one point for a CZ changes the phase . BUt in the ex we doing matrix way
@Anonymous Ohhhhh gotcha, so had we created a classicalRegister(2) like we did for allice then that should have worked ?
@Anonymous K. yes
Avatar
Anonymous 21-Jul-20 08:20 PM
It seems to be related to the servers being busy because so many are using, I would strongly recommend trying a little later. I know this has worked for others.
@Anonymous Asfaw I tried again and it worked. Thanks
Avatar
Anonymous 21-Jul-20 08:21 PM
Makes me super happy to see all of you learning quantum while trying it out in code 🙂 makes it way more fun than writing everything out although that's also important to be able to do
qiskitsmart 7
😆 1
SuperimposedSmile 2
None of this was possible five years ago
❤️ 5
Avatar
Anonymous 21-Jul-20 08:22 PM
💯 3
Avatar
Anonymous 21-Jul-20 08:23 PM
I think we all should try to learn and understand how quantum algorithm works. If we can do this, then we can try how it can be used in any application .
Avatar
Anonymous 21-Jul-20 08:25 PM
Hello. In class, the code presented by Elisa had, in the phase_oracle function, a line that read
qc.unitary(Operator(oracle_matrix),range(n))
From the documentation, I could not really grasp what is the use of the QuantumCircuit.unitary(): I see that from Operator() function, one formally transforms the NumPy matrix into an operator.
>
So what is the role of QuantumCircuit.unitary()? Does it make sure that the object passed to it as an argument (in this case, the Operator(oracle_matrix)) is an unitary operator? Or does it act this object onto the n qubits that are passed alongside as the second entry to the function? It looks like the second case is more sensible, but I'm a bit confused.
>
Thank you for reading this far. 🙂
(edited)
👍 1
Avatar
Anonymous 21-Jul-20 08:29 PM
It's the second case 🙂
Avatar
Anonymous 21-Jul-20 08:29 PM
Thank you @Anonymous Co ! 🙂
Avatar
Anonymous 21-Jul-20 08:59 PM
@Anonymous Operator(oracle_matrix)) does it means it converts matrix into some operator format?
Avatar
Anonymous 21-Jul-20 09:00 PM
what's wrong with this circuit?
@Anonymous Asfaw
Avatar
Anonymous 21-Jul-20 09:04 PM
The issue is with the grader, not necessarily the circuit Change the line in the last cell to read
optimization_level=3
Avatar
Anonymous 21-Jul-20 09:06 PM
We are supposed no to make changes in this cell right?@Anonymous
Avatar
Anonymous 21-Jul-20 09:08 PM
Other people in the chat, myself included, were having the same problem as you did. To my understanding, if you don't change that particular line then the file that you're sending to get graded when you run that cell is too large and the grader isn't able to receive your file.
👍 3
Avatar
Anonymous 21-Jul-20 09:16 PM
.
Avatar
Anonymous 21-Jul-20 09:19 PM
i changed optimization_level to 3 i stilll get the same error
👍 1
Avatar
Anonymous 21-Jul-20 09:20 PM
@Anonymous Operator(oracle_matrix)) does it means it converts matrix into some operator format?
@Anonymous for what I could tell, yes. It takes the 2^n by 2^n matrix oracle_matrix as input and results in an operator object; you can read more about it in the official documentation, linked below. 🙂 https://qiskit.org/documentation/stubs/qiskit.quantum_info.Operator.html#qiskit.quantum_info.Operator
Avatar
Anonymous 21-Jul-20 09:25 PM
How can I rectify the error below ?
Can anybody quide me how I can rectify this error ?
Avatar
Anonymous 21-Jul-20 09:29 PM
Hi @Anonymous SuperimposedSmile I am not sure if this was already explained, but I was checking the attendee guide and found out about an optional final project. How is it going to work? Thank you very much in advance ☺
👍 3
Avatar
Anonymous 21-Jul-20 09:58 PM
Wait so if the hamarad gate creates superposition, what are the qubits in before they are measured?
Avatar
Anonymous 21-Jul-20 09:58 PM
Are people still getting the is_update error?
Avatar
Anonymous 21-Jul-20 09:59 PM
The most recent one was at 8:15
Avatar
Anonymous 21-Jul-20 10:01 PM
The most recent one was at 8:15
@Anonymous Majboor I am still getting the error.
Avatar
Anonymous 21-Jul-20 10:02 PM
Oh
A solution proposed in #support-reference was setting optimization_level = 3
Avatar
Anonymous 21-Jul-20 10:09 PM
A solution proposed in #support-reference was setting optimization_level = 3
@Anonymous Majboor this worked after two tries
Avatar
Anonymous 21-Jul-20 10:09 PM
I suppose optimization_level had to be at 3, and the severs had to be not overloaded 🤷
Avatar
Anonymous 21-Jul-20 10:10 PM
I suppose optimization_level had to be at 3, and the severs had to be not overloaded 🤷
@Anonymous Majboor Tried that. Guess they are still overloaded.
Avatar
Anonymous 21-Jul-20 10:11 PM
😦
I hope that fixes soon.
Avatar
Anonymous 21-Jul-20 10:12 PM
Yep, I still haven't been able to submit either, for the same error syndrome. No rush in it though- I'm guessing they are trying to patch up the backend
Avatar
Anonymous 21-Jul-20 10:12 PM
Same problems here. I just kept running the final cell every 5 or so minutes and eventually it worked. I did have optimization_level=3
Avatar
Anonymous 21-Jul-20 10:14 PM
Where can I check my lab score ?
Avatar
Anonymous 21-Jul-20 10:15 PM
It is either pass or not.
Avatar
Anonymous 21-Jul-20 10:27 PM
I hope that fixes soon.
@Anonymous Majboor Worked for me finally. Thanks!
Avatar
Anonymous 21-Jul-20 10:35 PM
Is it sufficient to run the lab code in Jupyter Notebook which I installed in the laptop ? Is it also necessary to run the code in IBM Q Experience too ? Any idea about it ? I run my code in my laptop installed Qiskit, I got correct answer. But when I was trying to run it in IBM Q Experience, it is showing this error.
Is my lab work submitted and scored ?
Avatar
Anonymous 21-Jul-20 10:40 PM
grading tools is a local package in the lab folder... you’d have to copy the grading_tools folder onto ibm q experience but im not sure if thats possible
i guess just continue submitting the labs from your local jupyter notebook
Avatar
Anonymous 21-Jul-20 10:49 PM
I still got the error "is_update" HTM-5 9:50 PM
Avatar
Anonymous 21-Jul-20 10:53 PM
oh is_update might be a problem with the server. i heard a lot of lab students weren’t able to submit because of that
Avatar
Anonymous 21-Jul-20 10:54 PM
same here
Avatar
Anonymous 21-Jul-20 10:54 PM
I still got the error "is_update" HTM-5 9:50 PM
@Anonymous Bernier keep on running the last grader cell twice, thrice, 5 times patiently, it will succeed eventually
Avatar
Anonymous 21-Jul-20 10:57 PM
@Anonymous Thank you
👍 1
Avatar
Anonymous 21-Jul-20 11:00 PM
Thanks @Anonymous
Avatar
Anonymous 21-Jul-20 11:00 PM
@Anonymous lmao im thinking we could set up a loop thatll keep running the cell until an error isnt thrown😂
Avatar
Anonymous 21-Jul-20 11:02 PM
@Anonymous lmao im thinking we could set up a loop thatll keep running the cell until an error isnt thrown😂
@Anonymous yep I had also thought of that too, but then, my code worked in 3rd attempt, so the energy to write more code was gone 😂😂
Avatar
Anonymous 21-Jul-20 11:03 PM
@Anonymous did you change the optimization_level from ZERO to 3?
Avatar
Anonymous 21-Jul-20 11:04 PM
@Anonymous did you change the optimization_level from ZERO to 3?
@Anonymous Bernier no no, I changed nothing in the given code, just run the last cell multiple times😊
Avatar
Anonymous 21-Jul-20 11:05 PM
Ok, I will continue trying 🙂
Avatar
Anonymous 21-Jul-20 11:05 PM
Ok, I will continue trying 🙂
@Anonymous Bernier just one more thing, maybe you can cut the last line of grade(.....) in a separate cell, and then run that cell multiple times
It will work
Avatar
Anonymous 21-Jul-20 11:11 PM
Do we have lab video for day 2?
Avatar
Anonymous 21-Jul-20 11:12 PM
Register now for Qiskit Events's event on Crowdcast, scheduled to go live on Monday July 20, 2020 at 7:56 pm EDT.
😋 1
Avatar
Anonymous 21-Jul-20 11:13 PM
@Anonymous Bernier thanks
👍 1
Avatar
Anonymous 21-Jul-20 11:24 PM
Hi! I was trying to follow the measurement procedure in lab1 exercise. I apply x gate on Bobs qubit if Alice measures 1 in her qubit 1 and records that in her classical bit 1, and then I apply z gate on Bobs qubit if Alice measures 1 in her qubit 2 and records that in her classical bit 2. But this part of the circuit (if condition) doesn't show up in my circuit. Does anybody know why that could happen or have had that error?
Avatar
Anonymous 21-Jul-20 11:33 PM
Idk why my grover histogram looks this bad. i've spent a full hour checking each part of the code i wrote and i cant find what is wrong
Avatar
Anonymous 21-Jul-20 11:36 PM
maybe try to increase number of shot to 10000
?
Avatar
Anonymous 21-Jul-20 11:37 PM
I printed out the oracle matrix as it ran, as well as printing elements 0,1,42, and the matrix appears to be correct for both the oracle and diffuser runs
thanks @Anonymous but the shot statistics don't seem to be the problem, they output is more uniform with higher shots
in fact, that uniformity almost makes it seem like i'm not doing any operations after the initial hadamard on all qubits
Avatar
Anonymous 21-Jul-20 11:42 PM
my hisotgram also looks horrible i dont understand
Avatar
Anonymous 21-Jul-20 11:42 PM
yes, I thought you run on different backend but after checking , I see that you run on the same backend as I used. Your phase_oracle looks the same as mine but I got different output
Avatar
Anonymous 21-Jul-20 11:43 PM
I printed out the oracle matrix as it ran, as well as printing elements 0,1,42, and the matrix appears to be correct for both the oracle and diffuser runs
@Anonymous Sinko Hey, I faced a similar issue when I was doing this. Make sure you coded your diffuser correctly
Avatar
Anonymous 21-Jul-20 11:43 PM
and I took 10000 shots
Avatar
Anonymous 21-Jul-20 11:43 PM
this is the circuit, so it is certainly doing something (obviously this circuit couldnt be wrong since it results from code they gave us)
This is my diffuser, a hadamard on all n qubits, then the phase_oracle with only index 0 marked, then another set of hadamards
Avatar
Anonymous 21-Jul-20 11:44 PM
and my circut also looks right
Avatar
Anonymous 21-Jul-20 11:44 PM
@Anonymous Sinko Hey, I faced a similar issue when I was doing this. Make sure you coded your diffuser correctly
@Anonymous When I was coding the diffuser, I forgot to add the Hadamard gates before and after the phase oracle
Avatar
Anonymous 21-Jul-20 11:44 PM
yeah thats exactly what my diffuser looks like
Avatar
Anonymous 21-Jul-20 11:45 PM
I use qc.h(range(n))
Avatar
Anonymous 21-Jul-20 11:45 PM
qc.append(phase_oracle(n,[0]), range(n))
Avatar
Anonymous 21-Jul-20 11:45 PM
that is what is used in their code
append!!!!! omg
👍 1
Avatar
Anonymous 21-Jul-20 11:45 PM
I think you have to append the phase oracle
Avatar
Anonymous 21-Jul-20 11:47 PM
Omg how did i forget that
Avatar
Anonymous 21-Jul-20 11:47 PM
ugh, i had thought of that earlier, but i decided against it becuase we are calling the phase_oracle function inside the diffuser function, and the phase_oracle function already has an operator applied to the circuit in the second to last line: qc.unitary(Operator(oracle_matrix), range(n))
i guess i understand what we are doing algorithmically, but sometimes the way the code itself works is very confusing to me
Avatar
Anonymous 21-Jul-20 11:49 PM
there was also an error I got that tells that you have to apply operator and then append
Yes, the code has some words that are a little confusing
like i struggled for a while to find that np.identity simply "Returns the identity array"
this was very usefull
here is the full documentation of the numpy methods
Avatar
Anonymous 21-Jul-20 11:59 PM
thanks!
Avatar
Anonymous 22-Jul-20 12:04 AM
so for the |+> matrix: theta = pi/2, is that the angle on the bloch sphere?, or is that the angle in hilbert space? (edited)
Avatar
Anonymous BOT 22-Jul-20 12:07 AM
Your hand has been raised! A mentor will drop in as soon as they are available.
Avatar
Anonymous 22-Jul-20 12:10 AM
where exactly do we have to submit our python notebooks of lab assignments?
Avatar
Anonymous 22-Jul-20 12:10 AM
you just enter your name and email in the coresponding variables
Avatar
Anonymous 22-Jul-20 12:10 AM
Wait so why do we append the oracle within the diffuser?
Avatar
Anonymous 22-Jul-20 12:12 AM
@Anonymous Majboor that is we just have to run the last cell after completing the graded exercises and we are done?
Avatar
Anonymous 22-Jul-20 12:12 AM
Yes
Wait so why do we append the oracle within the diffuser?
@Anonymous it is just a required python method, just like .barrier()
Avatar
Anonymous 22-Jul-20 12:14 AM
Hi! I was trying to follow the measurement procedure in lab1 exercise. I apply x gate on Bobs qubit if Alice measures 1 in her qubit 1 and records that in her classical bit 1, and then I apply z gate on Bobs qubit if Alice measures 1 in her qubit 2 and records that in her classical bit 2. But this part of the circuit (if condition) doesn't show up in my circuit. Does anybody know why that could happen or have had that error?
Avatar
Anonymous 22-Jul-20 12:14 AM
Did you use if statements?
Avatar
Anonymous 22-Jul-20 12:15 AM
Yes
Avatar
Anonymous 22-Jul-20 12:15 AM
Because you need to use a different method.
Something like c.ifnot
Let me check
You must use .c_if()
Avatar
Anonymous 22-Jul-20 12:17 AM
circuit.c_if() ?
Avatar
Anonymous 22-Jul-20 12:17 AM
@Anonymous circuit.x(qubit).c_if() or something like that
Avatar
Anonymous 22-Jul-20 12:17 AM
Yes
Avatar
Anonymous 22-Jul-20 12:19 AM
@Anonymous Majboor what do you mean by "just a required python method?"
Avatar
Anonymous 22-Jul-20 12:23 AM
Oh crap! i have been using a diffreent email than the registration one to submit the labs, however, i have been consistent. is this ok? @Anonymous (edited)
Avatar
Anonymous 22-Jul-20 12:24 AM
@Anonymous Majboor and @Anonymous Thanks very much you guys! I was really confused about that.
Avatar
Anonymous 22-Jul-20 12:24 AM
cool!
@Anonymous were you able to grade?
Im receiving errors
Avatar
Anonymous 22-Jul-20 12:25 AM
Yes lab1 but not lab2
I think they might be handled by different servers or programs
I posted "If the server is unable to grade a lot of request, maybe we can agree upon half hour grading periods based on something like first name initial, or timezone or something, so that we can get our labs graded without everybody getting stuck." on labs #support-reference and help #feedback .
Avatar
Anonymous 22-Jul-20 12:27 AM
I just want to say don't give up even though at lab1
👍 1
Avatar
Anonymous 22-Jul-20 12:28 AM
Yes i submitted lab 1
but lab2 is giving me an "is_update" error
Avatar
Anonymous 22-Jul-20 12:29 AM
Did you try setting optimization variable to 3?
Called optimization_level i think
Avatar
Anonymous 22-Jul-20 12:29 AM
What is that for?
It says there not to mess with it
so its bit confusing
Avatar
Anonymous 22-Jul-20 12:30 AM
I think it's just too many requests for the server to grade
Avatar
Anonymous 22-Jul-20 12:31 AM
I think it shortens the overall program in some way
Anyways, people changed it and it did work after many attempts
Avatar
Anonymous 22-Jul-20 12:31 AM
lol
sqrt(n) attempts
Avatar
Anonymous 22-Jul-20 12:31 AM
I've been trying since 2 am. Still no luck :(
Avatar
Anonymous 22-Jul-20 12:32 AM
but lab2 is giving me an "is_update" error
@Anonymous Man, been getting this error since 2pm EDT. xD
Avatar
Anonymous 22-Jul-20 12:32 AM
@Anonymous @Anonymous any info?
@Anonymous oh god
😆 1
Avatar
Anonymous 22-Jul-20 12:32 AM
I've been trying since 2 am. Still no luck :(
@Anonymous Same here lol.
>
Did you try setting optimization variable to 3? @Anonymous Majboor Going to give this a shot. Man vs Qiskit: IT IS WAR. xD
Avatar
Anonymous 22-Jul-20 12:36 AM
if you look inside, it's just a list of qubits and classical bits, and so is_update would have to be a qubit, but that wouldn't make sense.
Avatar
Anonymous 22-Jul-20 12:38 AM
2:00 am - 3:30 am and 6:00 am - 11.30 am WIB, still no luck 😓
🙁 1
Avatar
Anonymous 22-Jul-20 12:41 AM
Mine isn't even submitting?
Avatar
Anonymous 22-Jul-20 12:51 AM
trying for an hour still "KeyError: 'is_update'"
Avatar
Anonymous 22-Jul-20 12:55 AM
trying for an hour still "KeyError: 'is_update'"
@Anonymous same error
Avatar
Anonymous 22-Jul-20 12:59 AM
@Anonymous server is down
Avatar
Anonymous 22-Jul-20 01:08 AM
Working now
Try
Avatar
Anonymous 22-Jul-20 01:15 AM
I was wondering if anyone could help explain how to use circuit.cz()... I am not entirely sure how to decide what goes into the "()" to mark the states
Avatar
Anonymous 22-Jul-20 01:17 AM
can anyone explain why grovers algorithm has sqrt(n) attempts
Avatar
Anonymous 22-Jul-20 01:19 AM
I've been trying to submit since 9PM EST (with is_update KeyErrors), eventually I just wrote this loop with optimization_level = 3 and it worked on the second try... not sure if that's a coincidence or if automating repeated submission is actually helpful.. hope this helps someone!
❤️ 1
Avatar
Anonymous 22-Jul-20 01:20 AM
optimization_level=3 works for me after 3 running
7 am
Avatar
Anonymous 22-Jul-20 01:23 AM
How to solve the “access denied” issue when installing the qiskit on jupyter notebook?
Avatar
Anonymous 22-Jul-20 01:24 AM
Set notebook as trusted
Click on "not trusted"
And it will give you option to change or do it automatically.
Avatar
Anonymous 22-Jul-20 01:55 AM
Hi All, Z gate gives a phase by pi rotation in |1>state ?
Avatar
Anonymous 22-Jul-20 01:56 AM
Getting this error while submission
KeyError Traceback (most recent call last) <ipython-input-7-5e0bcc032a27> in <module> 6 mycircuit_t = transpile(mycircuit, basis_gates=['u1', 'u2', 'u3', 'cx'], optimization_level=0) 7 from grading_tools import grade ----> 8 grade(answer=mycircuit_t, name=name, email=email, labid='lab2', exerciseid='ex1') C:\Saswati\Quantam-Computing\lab2\lab2\grading_tools\grade.py in grade(answer, name, email, labid, exerciseid, server, answerfile, force_commit) 178 email, 179 server + '/validate-answer', --> 180 session=session) 181 with open(os.path.join(dir_path, 'answers.enc'), 'w') as answer_file: 182 answer_file.write(session) C:\Saswati\Quantam-Computing\lab2\lab2\grading_tools\grade.py in check_answer(answer, lab_name, exercise_name, participant_name, participant_email, endpoint, verbose, session) 93 data['session'] = session 94 answer = send_request(data, endpoint) ---> 95 is_update = answer['is_update'] 96 session = answer['session'] 97 if answer['is_valid']: KeyError: 'is_update'
Avatar
Anonymous 22-Jul-20 01:58 AM
I am getting an error the input matrix is not unitary ??
Where am i getting it wrong??
Avatar
Anonymous 22-Jul-20 01:58 AM
How can I access the qubits in qc so that I can append the output of phase_oracle, using those qubits to qc
qc.append(..., what do I put in here)?
Avatar
Anonymous 22-Jul-20 02:01 AM
@Anonymous I can't see your picture clearly
Avatar
Anonymous 22-Jul-20 02:02 AM
Hi @Anonymous - I am getting the error while submission -KeyError Traceback (most recent call last) <ipython-input-7-5e0bcc032a27> in <module> 6 mycircuit_t = transpile(mycircuit, basis_gates=['u1', 'u2', 'u3', 'cx'], optimization_level=0) 7 from grading_tools import grade ----> 8 grade(answer=mycircuit_t, name=name, email=email, labid='lab2', exerciseid='ex1') C:\Saswati\Quantam-Computing\lab2\lab2\grading_tools\grade.py in grade(answer, name, email, labid, exerciseid, server, answerfile, force_commit) 178 email, 179 server + '/validate-answer', --> 180 session=session) 181 with open(os.path.join(dir_path, 'answers.enc'), 'w') as answer_file: 182 answer_file.write(session) C:\Saswati\Quantam-Computing\lab2\lab2\grading_tools\grade.py in check_answer(answer, lab_name, exercise_name, participant_name, participant_email, endpoint, verbose, session) 93 data['session'] = session 94 answer = send_request(data, endpoint) ---> 95 is_update = answer['is_update'] 96 session = answer['session'] 97 if answer['is_valid']: KeyError: 'is_update'
Avatar
Anonymous 22-Jul-20 02:02 AM
KeyError . . . . KeyError: 'is_update'
@Anonymous Tripathy yes. several people have faced this problem. you might want to retry several times. and changing the optimization level to 3 worked for some, me included... (edited)
Avatar
Anonymous 22-Jul-20 02:02 AM
hi
Avatar
Anonymous 22-Jul-20 02:02 AM
@Anonymous you need to change the code to oracle_matrix[i,i]
Avatar
Anonymous 22-Jul-20 02:03 AM
@Anonymous Tripathy hey there. Your code is fine. Just the servers are busy. You can keep trying to submit or change the optimization in the last cell to 2 or 3
Avatar
Anonymous 22-Jul-20 02:03 AM
@Anonymous here it is
Avatar
Anonymous 22-Jul-20 02:03 AM
@Anonymous Your current code is setting some of the off diagonals to -1
Avatar
Anonymous 22-Jul-20 02:04 AM
@Anonymous as @Anonymous said.. I'll be oracle_matrix [i][i] = -1
And you need to put in an if statement
Avatar
Anonymous 22-Jul-20 02:05 AM
@Anonymous ok i got it , but why an if statement ??
Avatar
Anonymous 22-Jul-20 02:05 AM
@Anonymous I think the for loop should work
Avatar
Anonymous 22-Jul-20 02:06 AM
@Anonymous you need to set the diagonal elements to -1. so oracle_matrix[i,i]
Avatar
Anonymous 22-Jul-20 02:07 AM
@Anonymous only those diagonal elements whose indices are marked should be set to -1. If statement can check that.
@Anonymous yep that should work as well
Avatar
Anonymous 22-Jul-20 02:08 AM
@Anonymous only those diagonal elements whose indices are marked should be set to -1. If statement can check that.
@Anonymous i don't think there's a need for that. since i is already iterating over indices_to_mark
Avatar
Anonymous 22-Jul-20 02:08 AM
@Anonymous @Anonymous @Anonymous thx guys now its error free let me check my circuit
Avatar
Anonymous 22-Jul-20 02:08 AM
@Anonymous oh yes. I just checked my code again. If is not needed
Thanks
💯 1
Avatar
Anonymous 22-Jul-20 02:09 AM
new error what is this?
Avatar
Anonymous 22-Jul-20 02:10 AM
new error what is this?
@Anonymous server overloaded. keep trying. some people have passed this by setting optimization_level to 3, and having the last line in a different cell. but other than that, it's all about when the server accepts your POST
Avatar
Anonymous 22-Jul-20 02:10 AM
good day! where can i find recording for the second lab? I counld not find it in #announcements
Avatar
Anonymous 22-Jul-20 02:11 AM
@Anonymous thx you
Avatar
Anonymous 22-Jul-20 02:12 AM
@Anonymous in #lab-exercises
Avatar
Anonymous 22-Jul-20 02:12 AM
@Anonymous in #lab-exercises
@Anonymous thanks! cheers
Avatar
Anonymous 22-Jul-20 02:16 AM
Hi All, Z gate gives a phase by pi rotation in |1>state . Correct ?
To read the phase from the statevector we need to extract the imag part from |1>state. Have i interpreted correct ?
Avatar
Anonymous 22-Jul-20 02:18 AM
@Anonymous I have the same issue in phase_oracle, What am I missing?
Avatar
Anonymous 22-Jul-20 02:18 AM
@Anonymous with the diagonal elements?
Avatar
Anonymous 22-Jul-20 02:20 AM
yes
Avatar
Anonymous 22-Jul-20 02:22 AM
@Anonymous yes the phase phi in exp(i phi) part becomes pi. And yes, to my understanding, for measurements we find the image of the vector on the |1>.
Avatar
Anonymous 22-Jul-20 02:22 AM
Whats wrong with my circuit??
Avatar
Anonymous 22-Jul-20 02:23 AM
Whats wrong with my circuit??
@Anonymous what are the states in plot_histogram ? (edited)
Avatar
Anonymous 22-Jul-20 02:23 AM
Hi everyone, I have a question regarding the Diffuser. In the problem we are supposed to mark the first state |0> with our phase_oracle. But that function would flip the sign such that we get diag(Uf0) = [-1 1 ... 1], the opposite of what we have in the notes. And if you run it with all states but the first one marked you don't get the right answer. Is there something I'm missing?
Avatar
Anonymous 22-Jul-20 02:24 AM
@Anonymous you need to initialize the identity oracle_matrix with -1 in the marked indices Thus the code will be : for i in indices_to_mark oracle_matrix[i][i] = -1
Avatar
Anonymous 22-Jul-20 02:24 AM
Hi everyone, I have a question regarding the Diffuser. In the problem we are supposed to mark the first state |0> with our phase_oracle. But that function would flip the sign such that we get diag(Uf0) = [-1 1 ... 1], the opposite of what we have in the notes. And if you run it with all states but the first one marked you don't get the right answer. Is there something I'm missing?
@Anonymous Oracle will only flip i.e change the sign but the diffuser will amplified the marked states. I think
Avatar
Anonymous 22-Jul-20 02:24 AM
@Anonymous This is it
Avatar
Anonymous 22-Jul-20 02:25 AM
@Anonymous This is it
@Anonymous OK which means items marked is not found .
Avatar
Anonymous 22-Jul-20 02:26 AM
What is the 'is_update' error?
And how to remove it?
Avatar
Anonymous 22-Jul-20 02:26 AM
@Anonymous Oracle function will only flip i.e change the sign only code realted to this is required
Avatar
Anonymous 22-Jul-20 02:26 AM
@Anonymous I had got this output in my first run. I think the problem is in the diffuser function
Avatar
Anonymous 22-Jul-20 02:26 AM
What is the 'is_update' error?
@Anonymous hey its server error. try after sometime
Avatar
Anonymous 22-Jul-20 02:26 AM
@Anonymous hey its server error. try after sometime
@Anonymous killing the kernel and retrying might help?
Avatar
Anonymous 22-Jul-20 02:26 AM
@Anonymous keep on submitting .. You can also try setting the optimization to 2 or 3 in the last cell
Avatar
Anonymous 22-Jul-20 02:27 AM
@Anonymous Is your phase oracle function correct ? Diffuser function code depends what they have mention in the explanation cell. sandwich between H gate (edited)
Avatar
Anonymous 22-Jul-20 02:27 AM
@Anonymous no your kernel is fine. Just the servers are busy so they can't accept your answer.
Avatar
Anonymous 22-Jul-20 02:27 AM
@Anonymous Is your phase oracle function correct ?
@Anonymous i think it's correct..
Avatar
Anonymous 22-Jul-20 02:29 AM
@Anonymous thank you
Avatar
Anonymous 22-Jul-20 02:29 AM
@Anonymous Oracle will only flip i.e change the sign but the diffuser will amplified the marked states. I think
@Anonymous But the diffuser uses the phase_oracle function to flip the first state as well, the amplification is a consequence of this. But my question is regarding which states we flip in the in the diffuser, because in the notes we are supposed to flip all but the first, but in the problem only the first one.
Avatar
Anonymous 22-Jul-20 02:30 AM
@Anonymous keep on submitting .. You can also try setting the optimization to 2 or 3 in the last cell
@Anonymous but they mentioned that i am not supposed to change anything in the last cell, isn't it?
Avatar
Anonymous 22-Jul-20 02:31 AM
@Anonymous yes.. I had asked the same question. But we can change optimization (many others ,including me, did it too) to be able to submit.
That is what they told me and it worked after couple more trials.
Avatar
Anonymous 22-Jul-20 02:31 AM
Wait i got an incorrect answer :(
Avatar
Anonymous 22-Jul-20 02:31 AM
you can go on with optimization 0 too .. But just keep on trying
Avatar
Anonymous 22-Jul-20 02:31 AM
I think my diffusion is wrong
Can anyone help me with it?
Avatar
Anonymous 22-Jul-20 02:32 AM
@Anonymous But the diffuser uses the phase_oracle function to flip the first state as well, the amplification is a consequence of this. But my question is regarding which states we flip in the in the diffuser, because in the notes we are supposed to flip all but the first, but in the problem only the first one.
@Anonymous Phase oracle will flip the marked items and in diffuser we need to append the phase oracle circuit.In the notes of notebook they have mention only |0>state. (edited)
Avatar
Anonymous 22-Jul-20 02:33 AM
Is it correct?
Avatar
Anonymous 22-Jul-20 02:33 AM
@Anonymous you need to use two for loops for the h gates
for i in range(n) qc.h(i)
Replace both the sentences with the code above
Avatar
Anonymous 22-Jul-20 02:34 AM
@Anonymous nothing only in the section where you are calling the phase oracle you need to append with the qc circuit. Sorry i can't reveal more .Don't want SPOILER
Avatar
Anonymous 22-Jul-20 02:35 AM
@Anonymous Phase oracle will flip the marked items and in diffuser we need to append the phase oracle circuit.In the notes of notebook they have mention only |0>state.
@Anonymous Yes, but in the notes the 'positive' element is only the |0> state while the rest are negative. On the other hand in the exercise the |0> is the negative while the rest are positive (edited)
Avatar
Anonymous 22-Jul-20 02:36 AM
@Anonymous check what @Anonymous said as well. You need to append in the circuit
Avatar
Anonymous 22-Jul-20 02:36 AM
Replace both the sentences with the code above
@Anonymous replacing only those would solve the error?
@Anonymous check what @Anonymous said as well. You need to append in the circuit
@Anonymous okay
Avatar
Anonymous 22-Jul-20 02:36 AM
@Anonymous Read the explanation in the notebook all those are well explained for us to write the code.
Avatar
Anonymous 22-Jul-20 02:36 AM
@Anonymous hint appending the circuit is already in phase oracle
*hint :
Avatar
Anonymous 22-Jul-20 02:40 AM
@Anonymous in append arg1 is the phase oracle and we have to applied to all qubits. Cant't reveal beyond this. All hints are given. Try you will make it.
Avatar
Anonymous 22-Jul-20 02:40 AM
Okay..gotcha!
Avatar
Anonymous 22-Jul-20 02:41 AM
Okay..gotcha!
@Anonymous WE need to carefully read the notebook theory , it is very well explained. Let me know if any more pointers?
Avatar
Anonymous 22-Jul-20 02:42 AM
Avatar
Anonymous 22-Jul-20 02:43 AM
qc.unitary(Operator(oracle_matrix), range(n))? Operator converts oracle matrix into some other kind of Density_matrix ?
Avatar
Anonymous 22-Jul-20 02:43 AM
see if it helps
qc.unitary(Operator(oracle_matrix), range(n))? Operator converts oracle matrix into some other kind of Density_matrix ?
@Anonymous no it converts it into circuit
matrix to circuit
Avatar
Anonymous 22-Jul-20 02:44 AM
@Anonymous no it converts it into circuit
@Anonymous Actually i get confused with this Operator. I think it depends on the argument send on it. Correct?
Can i say Operator(circuit) converts to matrix
and vice versa
Avatar
Anonymous 22-Jul-20 02:46 AM
no i dont think it would work
you see its hard to make a circuit from a matrix so we need these operators
like isometry(), diagonal() and others
but its a child play to get a matrix from circuit. Its just matrix multiplication
Avatar
Anonymous 22-Jul-20 02:48 AM
i still don't have the correct circuit?
Need help whats wrong??
Avatar
Anonymous 22-Jul-20 02:49 AM
>
i still don't have the correct circuit? @Anonymous you need help with somthing
Avatar
Anonymous 22-Jul-20 02:50 AM
@Anonymous yep whats wrong in the circuit ??
Avatar
Anonymous 22-Jul-20 02:50 AM
see i think you messed up the code
send it i will explain it to you
Avatar
Anonymous 22-Jul-20 02:51 AM
sure
Avatar
Anonymous 22-Jul-20 02:51 AM
samparn did you get that append thing ?
Avatar
Anonymous 22-Jul-20 02:51 AM
Good morning to everyone
Avatar
Anonymous 22-Jul-20 02:51 AM
@Anonymous seeing the circuit diagram I don't think we can help.. Circuit diagram will be same for all of us. If you can, kindly DM me your code. I can try to help
Avatar
Anonymous 22-Jul-20 02:52 AM
Still trying to submit at 01:51 GMT -5 'is_update' error
Avatar
Anonymous 22-Jul-20 02:52 AM
@Anonymous yep I did. Its there in the grover function under #step2
Avatar
Anonymous 22-Jul-20 02:52 AM
this is the code
Avatar
Anonymous 22-Jul-20 02:53 AM
@Anonymous keep on trying.. I did it for 6 hours :(
Avatar
Anonymous 22-Jul-20 02:53 AM
@Anonymous yep I did. Its there in the grover function under #step2
@Anonymous remember this function when algo gets big it will help a lot
Avatar
Anonymous 22-Jul-20 02:53 AM
@Anonymous keep on trying.. I did it for 6 hours :(
@Anonymous That's quite sad. I must go to sleep now xDDD
Avatar
Anonymous 22-Jul-20 02:53 AM
see he did the same mistake
Avatar
Anonymous 22-Jul-20 02:53 AM
@Anonymous yep :)
Avatar
Anonymous 22-Jul-20 02:53 AM
See you later
Avatar
Anonymous 22-Jul-20 02:53 AM
whats the mistake??
Avatar
Anonymous 22-Jul-20 02:54 AM
hai tilak
let me explain
Avatar
Anonymous 22-Jul-20 02:54 AM
sure please
Avatar
Anonymous 22-Jul-20 02:55 AM
@Anonymous ok there are a few fundamental errors.. But I can't give you the code here directly to prevent spoilers. You need to change both the functions a bit.
Avatar
Anonymous 22-Jul-20 02:55 AM
your phase_oracal is a seperate circuit on its own right with its seperate quantum and classical qubit
Avatar
Anonymous 22-Jul-20 02:55 AM
@Anonymous night night xD
Avatar
Anonymous 22-Jul-20 02:56 AM
@Anonymous ok there are a few fundamental errors.. But I can't give you the code here directly to prevent spoilers. You need to change both the functions a bit.
@Anonymous if you see its not a spoiler at all its just an append code. He got the basics and dont know about the append code. Its no harm in telling about it
Avatar
Anonymous 22-Jul-20 02:59 AM
@Anonymous cool.
Avatar
Anonymous 22-Jul-20 02:59 AM
@Anonymous @Anonymous thanks guys! I finally got the correct submission!
Avatar
Anonymous 22-Jul-20 02:59 AM
@Anonymous anytime :)
Avatar
Anonymous 22-Jul-20 02:59 AM
:)
Avatar
Anonymous 22-Jul-20 02:59 AM
@Anonymous you can use a separate circuit in between building another circuit. Bu using the previous one using append function (edited)
Avatar
Anonymous 22-Jul-20 03:00 AM
@Anonymous @Anonymous thanks guys! I finally got the correct submission!
@Anonymous I hope you understood.
Avatar
Anonymous 22-Jul-20 03:00 AM
ho
Avatar
Anonymous 22-Jul-20 03:00 AM
what it dose is that it applies the whole circuit to the assigned qubits of the diffusion circuit
Avatar
Anonymous 22-Jul-20 03:01 AM
Sed I can't submit. I tried a lot. When will the server be free?
Avatar
Anonymous 22-Jul-20 03:01 AM
got it
let me try
Avatar
Anonymous 22-Jul-20 03:01 AM
@Anonymous I hope you understood.
@Anonymous Welcome. We all are learning together .
Avatar
Anonymous 22-Jul-20 03:01 AM
@Anonymous no idea.. We just had to keep on trying :(
Avatar
Anonymous 22-Jul-20 03:02 AM
got it
@Anonymous see the grover function and you will see how append works (edited)
Avatar
Anonymous 22-Jul-20 03:02 AM
@Anonymous I hope you understood.
@Anonymous yes! Absolutely! Thanks so much!!
👍 1
Avatar
Anonymous 22-Jul-20 03:03 AM
@Anonymous thx a lot
Avatar
Anonymous 22-Jul-20 03:03 AM
if you dont get it let me know i will explain it using some diagram or somthing
Avatar
Anonymous 22-Jul-20 03:03 AM
@Anonymous sure
Avatar
Anonymous 22-Jul-20 03:04 AM
are people still getting is_update error?!?
Avatar
Anonymous 22-Jul-20 03:04 AM
yes
Avatar
Anonymous 22-Jul-20 03:06 AM
same here. I've been trying since yesterday night to submit and its still showing is_update error for me!
Avatar
Anonymous 22-Jul-20 03:07 AM
did you guys try changing the optimization_level in the last cell?
if not, in the last cell you'll see a line containing
optimization_level=0
change the 0 to a 3 and then run the last cell to see if it submits
Other people in the chat, myself included, were having the same problem as you did. To my understanding, if you don't change that particular line then the file that you're sending to get graded when you run that cell is too large and the grader isn't able to receive your file.
@Anonymous
Avatar
Anonymous 22-Jul-20 03:15 AM
Did anyone figure out the is_update error?
Avatar
Anonymous 22-Jul-20 03:16 AM
yes
@Anonymous Chappidi I tried a million times with optimization level 0 but it never worked. On changing it to 3 like others it worked in my first attemp.
*attempt. So changing it does make a lot of difference
But actually thats the only fix. In don't think we are supposed to change it.
Avatar
Anonymous 22-Jul-20 03:21 AM
optimization_level=0 has nothing to do with the submission
transpile way to reduce your circuit cost and to what extent is decided by the optimization_level
👍 1
will see if i can find any think about this update error
Avatar
Anonymous 22-Jul-20 03:29 AM
but changing the optimisation level does work somehow
i was getting the same error rn when optimisation lvl was 0
as soon as i changed it voila
Avatar
Anonymous 22-Jul-20 03:31 AM
transpile way to reduce your circuit cost and to what extent is decided by the optimization_level
@Anonymous well greater optimisation means less circuit cost and thus less to process on the server side. i see in the grade file that the POST posts the data written into the answer file. less data would definitely mean chances of a response.
Avatar
Anonymous 22-Jul-20 03:34 AM
@Anonymous well greater optimisation means less circuit cost and thus less to process on the server side.
>
i see in the grade file that the POST posts the data written into the answer file. less data would definitely mean chances of a response.
@Anonymous i dont think that would help
the amount of data wont be affedted that much
Avatar
Anonymous 22-Jul-20 03:35 AM
Is it necessary to work out on the lab assignments in the given folder lab2, as the Jupyter Notebook file name ex1 is same as earlier ?
Avatar
Anonymous 22-Jul-20 03:36 AM
I've been trying to submit since 9PM EST (with is_update KeyErrors), eventually I just wrote this loop with optimization_level = 3 and it worked on the second try... not sure if that's a coincidence or if automating repeated submission is actually helpful.. hope this helps someone!
@Anonymous Thank you for this! I was finally able to submit by using your loop. Cheers!
qiskitwhite 1
Avatar
Anonymous 22-Jul-20 03:38 AM
the amount of data wont be affedted that much
@Anonymous well maybe, it's just that people are getting through with it. optimised circuits (if they are running the transpiled circuits at the remote end) would mean faster response and less changes of a timeout and thus the presence of the update key in the response still, it's just that whatever works for someone.
Avatar
Anonymous 22-Jul-20 03:40 AM
no i dont think it would work
@Anonymous Thanks
Avatar
Anonymous 22-Jul-20 03:46 AM
for is_update error, it might be server overload error(not confirmed), wait for 30-40 minutes.
Avatar
Anonymous 22-Jul-20 03:51 AM
Can one of the mentors answer this question plz; if we wanna get a certificate, we have to submit each lab before it’s solution is released, right? Because after the solution is released, the grades won’t be updated, right? I’m not able to find a clear answer to this even though I know the deadline is July 31st! Also does the certificate reflect the grade or is it just pass/fail? Sorry if this question is asked before, I wanna make sure about it...
Avatar
Anonymous 22-Jul-20 03:53 AM
The certificate reflects that you are empowered with an applied understanding and comfort with and about Quantum Computing - which you are learning with and/or without the solutions TL; DR: Labs are hands-on learning mechanisms, not grading mechanisms.
👍 3
Avatar
Anonymous 22-Jul-20 03:54 AM
@Anonymous Huang so we can work with solutions as well
Avatar
Anonymous 22-Jul-20 03:56 AM
Yes. We want you to learn the most as possible. You can decide for yourself the way you learn the best. You can try your best to solve the labs. If you can't solve them, discuss with other people. If you still can't solve them, look at the solutions and think about them. Try them out and discuss.
👍 3
Avatar
Anonymous 22-Jul-20 03:57 AM
@Anonymous Huang I am a mech undergrad trying hard to get into this thanks for the help junye
Avatar
Anonymous 22-Jul-20 03:57 AM
The certificate reflects that you are empowered with an applied understanding and comfort with and about Quantum Computing - which you are learning with and/or without the solutions
>
TL; DR: Labs are hands-on learning mechanisms, not grading mechanisms.
@Anonymous Huang thanks, yes I saw this before posting my Q, but I read in another post that grades can not be updated after the solution is released, does this mean submitting after 24 hrs will not let our lab be evaluated?
Avatar
Anonymous 22-Jul-20 03:58 AM
@Anonymous same thing one mentor has said to me
👍 1
Avatar
Anonymous 22-Jul-20 03:59 AM
@Anonymous @Anonymous can you point me to the message saying that or the name of the mentor? Let me double check.
Avatar
Anonymous 22-Jul-20 03:59 AM
@Anonymous Huang I can't recall
Avatar
Anonymous 22-Jul-20 03:59 AM
Yes. We want you to learn the most as possible. You can decide for yourself the way you learn the best. You can try your best to solve the labs. If you can't solve them, discuss with other people. If you still can't solve them, look at the solutions and think about them. Try them out and discuss.
@Anonymous Huang also, how would one get minimum 65% satisfied if no grading can happen after 24 hrs?
Avatar
Anonymous 22-Jul-20 04:00 AM
As far as I know you can submit for grading anytime until the summer school ends. But let me double check with other mentors and organisers. (edited)
Avatar
Anonymous 22-Jul-20 04:00 AM
@Anonymous Huang yes please
Avatar
Anonymous 22-Jul-20 04:01 AM
@Anonymous Huang I can't recall
@Anonymous same here, I can not find which group it was mentioned in ...
Avatar
Anonymous 22-Jul-20 04:01 AM
@Anonymous did you submitted lab 1 and 2
Avatar
Anonymous 22-Jul-20 04:03 AM
hi
Avatar
Anonymous 22-Jul-20 04:06 AM
@Anonymous Huang I agree with you. According to what I know it is allowed to submit anytime before 31st july 11:59 PM EDT and the best submission will be graded.
👍 3
Avatar
Anonymous 22-Jul-20 04:07 AM
Hi, in the lab 2 topic of Operator. # Convert circuit to an operator by implicit unitary simulation if the arg is a quantum circuit then Operator(qc) .Then can i say it gives the unitary matrix for the gate applied. Ex: qc.h(0) followed by Operator(qc)
Avatar
Anonymous 22-Jul-20 04:07 AM
@Anonymous best submission like what
Avatar
Anonymous 22-Jul-20 04:09 AM
Are servers still full? I got the answer "Response not ready"
Avatar
Anonymous 22-Jul-20 04:10 AM
Tried since 13 hour ago,Finally.... 🥰 (edited)
💯 3
Avatar
Anonymous 22-Jul-20 04:10 AM
Hi, in the lab 2 topic of Operator. # Convert circuit to an operator by implicit unitary simulation if the arg is a quantum circuit then Operator(qc) .Then can i say it gives the unitary matrix for the gate applied. Ex: qc.h(0) followed by Operator(qc)
@Anonymous @Anonymous kindly help me on this Operator .I have read thorugh and tried example to interpret
Avatar
Anonymous 22-Jul-20 04:11 AM
@Anonymous best submission out of all submissions for each lab
Avatar
Anonymous 22-Jul-20 04:11 AM
@Anonymous @Anonymous kindly help me on this Operator .I have read thorugh and tried example to interpret
@Anonymous
Avatar
Anonymous 22-Jul-20 04:13 AM
@Anonymous This operator is exactly the hadmard gate. You basically took the circuit with only a hadamard gate and transformed it into it's unitary matrix. If you add another gate, then you get an operator that is the combination of the hadamard gate and whatever else you added. If you add another hadamard gate, you the back the identity gate (edited)
Avatar
Anonymous 22-Jul-20 04:17 AM
@Anonymous Schmitt why I am getting key error
Avatar
Anonymous 22-Jul-20 04:18 AM
@Anonymous Schmitt why I am getting key error
@Anonymous You will need to be more specific... (:
Avatar
Anonymous 22-Jul-20 04:19 AM
@Anonymous Schmitt I am getting key error update after rerunning my code
Avatar
Anonymous 22-Jul-20 04:20 AM
Does anyone know the difference of a qubit and a register?
Avatar
Anonymous 22-Jul-20 04:21 AM
@Anonymous Schmitt I am getting key error update after rerunning my code
@Anonymous The server is overloaded. Wait a bit a then try again.
Does anyone know the difference of a qubit and a register?
@Anonymous A quantum register is an array qubits.
👍 1
Avatar
Anonymous 22-Jul-20 04:28 AM
hi is there a way to download the class videos
Avatar
Anonymous 22-Jul-20 04:32 AM
the server is down now
Avatar
Anonymous 22-Jul-20 04:32 AM
officially cant find any
hi is there a way to download the class videos
@Anonymous
the server is down now
@Anonymous wait you have enough time
Avatar
Anonymous 22-Jul-20 04:33 AM
yes bro
Avatar
Anonymous 22-Jul-20 04:33 AM
@Anonymous will late submission affect grades my net connection is nit not working properly
Avatar
Anonymous 22-Jul-20 04:33 AM
and if the error is from their side i guess they will extend the deadline as well
@Anonymous will late submission affect grades my net connection is nit not working properly
@Anonymous Sorry bud but I can't say anything about that.
but I'm sure the server will be ready for submission soon (edited)
Avatar
Anonymous 22-Jul-20 04:42 AM
just change the optimization_level to 3 bro
don't know why it works, but it does
Avatar
Anonymous 22-Jul-20 04:43 AM
whatever helps do it
just know that isn't not a prob related to your code.
Avatar
Anonymous 22-Jul-20 04:44 AM
optimization_level=3 works
💯 1
Avatar
Anonymous 22-Jul-20 04:46 AM
yeah, I mean it's 6 qubit
Avatar
Anonymous 22-Jul-20 04:46 AM
not working for optimization_level=3
Avatar
Anonymous 22-Jul-20 04:46 AM
my laptop give immediate answer
Avatar
Anonymous 22-Jul-20 04:47 AM
Question, I think I didn't get it right about Grover's Algorithm exercise... How are we/will be solving anything if we are already telling the algorithm which indices we are looking for? (edited)
Avatar
Anonymous 22-Jul-20 04:48 AM
welp, a probable real-world-application is the oracle is unknown tho
you just put it in
Avatar
Anonymous 22-Jul-20 04:48 AM
of the top list of qc algorithms, Grover's is the least convincing to me in terms of providing a distinct advantage
Avatar
Anonymous 22-Jul-20 04:51 AM
of the top list of qc algorithms, Grover's is the least convincing to me in terms of providing a distinct advantage
@Anonymous as said earlier this algo is used as an example for the computation power of quantum computer not as a problem solving algorithm
🆗 1
Avatar
Anonymous 22-Jul-20 04:53 AM
@Anonymous Hernandez the algorithm provides the domain (the search results) of the function given its range as the highest probable outcome
👍 1
@Anonymous i get that Codie...it's the code efficiency argument that's I'm not fully comfortable with
@Anonymous the mathematical construction itself by Lov Grover is nothing short of a genius
Avatar
Anonymous 22-Jul-20 05:03 AM
got it, forgot about that was even mentioned by Elisa during the lesson
(sic) algorithm for (quotes) searching an unsorted database (quotes)
Avatar
Anonymous 22-Jul-20 05:06 AM
I couldn't understand this 'reflection part about avg'. Anyone please explain it?
Avatar
Anonymous 22-Jul-20 05:11 AM
@Anonymous Gupta that's the diffusion part, the main piece of the G process
@Anonymous Gupta try out the equation to best get a feel for it...conceptually it's analogous to finding a minimum; a slope for example
Avatar
Anonymous 22-Jul-20 05:16 AM
@Anonymous Is this the reflection about the average amplitude of superposition state ?
Avatar
Anonymous 22-Jul-20 05:17 AM
yes
Avatar
Anonymous 22-Jul-20 05:17 AM
Avatar
Anonymous 22-Jul-20 05:18 AM
@Anonymous Gupta a decomposition over the basis states...you're right
Avatar
Anonymous 22-Jul-20 05:18 AM
@Anonymous Thank you for this! I was finally able to submit by using your loop. Cheers!
@Anonymous Thanks as well - just submitted on the second try also!
👍 1
qiskitwhite 1
Avatar
Anonymous 22-Jul-20 05:18 AM
| s > is the average of amplitudes taken from superposition (I believe) and the orthogonal basis are | w > (the vertical one which is the marked one) and | s' > (everything excluding w)
Avatar
Anonymous 22-Jul-20 05:19 AM
Thanks @Anonymous
@Anonymous ok. Got it now! Theses are your notes?
Avatar
Anonymous 22-Jul-20 05:21 AM
They are from the qiskit textbook. I will link https://qiskit.org/textbook/ch-algorithms/grover.html
A university quantum algorithms/computation course supplement based on Qiskit
👍 1
Avatar
Anonymous 22-Jul-20 05:23 AM
For those interested in learning the mathematical tricks introduced in the lectures, take a look at Linear Algebra and Matrix Theory by Gilbert and Gilbert...the book doesn't discuss infinite dimensional vector spaces (the Hilbert operator) but introduces all the necessary mathematical background to understand it
👍 1
or check out the more advanced book: Advanced Calculus with Applications in Statistics for Andre Khuri (Chapters 1, 2, 6, 10, 11, and 12)
👍 1
I think anyone doing qm shouldn't take shortcuts when it comes to the necessary math
the Stanford lectures by Prof. Osgood (The Fourier Transform and its Applications) is also a great resource and Prof. Osgood has excellent notes (almost a book) that you use ... I think for the math so far introduced you only need to listen to the first 15 lectures
the class is all about linear operators though this phrase is never used in the class (at least I don't remember hearing it 🙂
sorry i wrote too much 🙂
Avatar
Anonymous 22-Jul-20 05:47 AM
can any one guide me what is the error in this code ?!
I am getting errors
Avatar
Anonymous 22-Jul-20 05:48 AM
Go through the lecture video
Avatar
Anonymous 22-Jul-20 05:48 AM
@Anonymous This operator is exactly the hadmard gate. You basically took the circuit with only a hadamard gate and transformed it into it's unitary matrix. If you add another gate, then you get an operator that is the combination of the hadamard gate and whatever else you added. If you add another hadamard gate, you the back the identity gate
@Anonymous Schmitt Basically Operator converts circuit into unitary matrix.Even i tried using Unitary_simulator , it also gives the unitary matrix.Then what's the difference between the two. (edited)
Avatar
Anonymous 22-Jul-20 05:51 AM
can any one guide me what is the error in this code ?!
@Anonymous Miqdad Khan can you show the errors you getting
Avatar
Anonymous 22-Jul-20 05:52 AM
@Anonymous Miqdad Khan can you show the errors you getting
@Anonymous
Avatar
Anonymous 22-Jul-20 05:53 AM
there is prob with your oracle matrix
Avatar
Anonymous 22-Jul-20 05:53 AM
I'd recommend to look at numpy.Identity
Avatar
Anonymous 22-Jul-20 05:54 AM
I'd recommend to look at numpy.Identity
@Anonymous Ya its very easy to that way
Avatar
Anonymous 22-Jul-20 05:54 AM
there is prob with your oracle matrix
@Anonymous how can i resolve it ?
I'd recommend to look at numpy.Identity
@Anonymous didn't get
Avatar
Anonymous 22-Jul-20 05:54 AM
use numpy to make a identety matrix of 2^n
Avatar
Anonymous 22-Jul-20 05:55 AM
the error says it is not unitary (which seems specific to qiskit) so I think something is wrong with your matrix
Avatar
Anonymous 22-Jul-20 05:55 AM
then switch the [index,index] element to -1
Avatar
Anonymous 22-Jul-20 05:55 AM
possibly because it uses a list declaration but idk
where np.Identity(2**n)
check line 157 of the source code
Terra provides the foundations for Qiskit. It allows the user to write quantum circuits easily, and takes care of the constraints of real hardware. - Qiskit/qiskit-terra
Avatar
Anonymous 22-Jul-20 06:02 AM
@Anonymous how can i resolve it ?
@Anonymous Miqdad Khan Okay. Tum numy module ke bare me jante ho na. import numpy as np usme ek comand hai np.identity(n), aur wo identity matrix banata n*n dimension ka. So try to use that. fir uske bad you can change the [index,index] element of that identity matrix to -1
possibly because it uses a list declaration but idk
@Anonymous that could be reason
Avatar
Anonymous 22-Jul-20 06:05 AM
Thank you let me try
Avatar
Anonymous 22-Jul-20 06:09 AM
Thank you let me try
@Anonymous Miqdad Khan Anytime
Avatar
Anonymous BOT 22-Jul-20 06:10 AM
Your hand has been raised! A mentor will drop in as soon as they are available.
Avatar
Anonymous 22-Jul-20 06:11 AM
Your hand has been raised! A mentor will drop in as soon as they are available.
@Anonymous not fair i was having a good time here
Avatar
Anonymous 22-Jul-20 06:23 AM
I'm still getting is_update error while submitting. Did anyone resolve this?
Avatar
Anonymous 22-Jul-20 06:23 AM
I'm still getting is_update error while submitting. Did anyone resolve this?
@Anonymous Okay lemme ask someone
👍 1
no update on it bro. Keep trying after some time.
will be fixed soon
👍 1
Avatar
Anonymous 22-Jul-20 06:28 AM
@Anonymous @Anonymous Thank You!
💯 1
Avatar
Anonymous 22-Jul-20 06:30 AM
@Anonymous if you change optimization level to 3 it should allow submission ( someone suggested to me)
Avatar
Anonymous 22-Jul-20 06:31 AM
When are they going to publish the solution for lab1 experiments?
Avatar
Anonymous 22-Jul-20 06:32 AM
they already did
Avatar
Anonymous 22-Jul-20 06:36 AM
@Anonymous yes i submit it by doing it 3
Avatar
Anonymous 22-Jul-20 06:37 AM
@Anonymous if you change optimization level to 3 it should allow submission ( someone suggested to me)
@Anonymous Its nothing. For some its working for some its not.
@Anonymous yes i submit it by doing it 3
@Anonymous Miqdad Khan good for you
but that's not a solution to this problem
Avatar
Anonymous 22-Jul-20 06:44 AM
Setting optimization=3 worked for me after a few times. Just my 2 cents.
Avatar
Anonymous 22-Jul-20 06:46 AM
its just a chance of luck.
nothing more. If there would have been something with optimization you would have get it in first shot.
Please dont spread this optimization = 3 thing
Avatar
Anonymous 22-Jul-20 06:48 AM
It is just server issue i guess
It will get resolve in day or two
Avatar
Anonymous 22-Jul-20 06:54 AM
@Anonymous brother I got an error called cannot import name 'random_quantum_channel' from qiskit.quantum_info.random'
Avatar
Anonymous 22-Jul-20 06:57 AM
Where is the Lab 2?
Avatar
Anonymous 22-Jul-20 06:57 AM
@Anonymous brother I got an error called cannot import name 'random_quantum_channel' from qiskit.quantum_info.random'
@Anonymous shukla can you send a pic
Where is the Lab 2?
@Anonymous Fitter see the instruction. Scroll up a bit, you will find a zip file there for lab 2 (edited)
👍 1
Avatar
Anonymous 22-Jul-20 07:01 AM
Avatar
Anonymous 22-Jul-20 07:06 AM
i can only say restart the kernel and run it frees
Avatar
Anonymous 22-Jul-20 07:06 AM
Anyone else getting this?
Avatar
Anonymous 22-Jul-20 07:07 AM
ya wait it will be solved
its not a problem with your code. its the server problem
Avatar
Anonymous 22-Jul-20 07:07 AM
Oh okie thanks :))
Avatar
Anonymous 22-Jul-20 07:07 AM
@Anonymous from where can I restart it?
Avatar
Anonymous 22-Jul-20 07:07 AM
@Anonymous from where can I restart it?
@Anonymous shukla On top, Kernel menu
Avatar
Anonymous 22-Jul-20 07:08 AM
>
@Anonymous from where can I restart it? @Anonymous shukla on the top you will find the option to restart and run all
Avatar
Anonymous 22-Jul-20 07:13 AM
@Anonymous @Anonymous No setting optimization = 3 didnt work for me
Avatar
Anonymous 22-Jul-20 07:14 AM
Still having same problem brother
Avatar
Anonymous 22-Jul-20 07:14 AM
@Anonymous @Anonymous No setting optimization = 3 didnt work for me
@Anonymous it may or may not work its not official. some people are saying that it worked for them
so i cant say that so this ans it will get your job done
Avatar
Anonymous 22-Jul-20 07:15 AM
How did people submit the assignment at all, is there any way to get out of the error?1
Avatar
Anonymous 22-Jul-20 07:17 AM
How did people submit the assignment at all, is there any way to get out of the error?1
@Anonymous its a legend that using optimization = 3 will work but no one know why and now. for some people it worked but for some it wont. Try your luck adventurer.
and i submit it like 15 min after the lab was uploaded and i dint face any of these.
if the optimization doesn't works then all you can do it wait until it get fixed.
Avatar
Anonymous 22-Jul-20 07:20 AM
@Anonymous could mentors please take note of this issue and sort it out
Avatar
Anonymous 22-Jul-20 07:20 AM
@Anonymous we are trying to figure out something.
👍 1
Avatar
Anonymous 22-Jul-20 07:28 AM
https://discord.com/channels/729706617951485954/732633353471393853/735451419557232703 @Anonymous see this i'm not so sure what's with this error (edited)
Avatar
Anonymous 22-Jul-20 07:29 AM
Anyone else getting this?
@Anonymous Fitter yes me too
Avatar
Anonymous 22-Jul-20 07:29 AM
@Anonymous shukla to be sure is your browser have active internet connection
@Anonymous Fitter yes me too
@Anonymous almost everyone is getting this
be patient it will be resolved soon
Avatar
Anonymous 22-Jul-20 07:32 AM
in Grover's algorithm if w = I11), how does applying a controlled Z Gate make us realise the sign change on applying the oracle?
Avatar
Anonymous 22-Jul-20 07:35 AM
wait what can you elaborate
Avatar
Anonymous 22-Jul-20 07:41 AM
In grover's algorithm, if the winning qubit is I11>, then the oracle is a controlled X gate. How does the controlled X gate apply a minus sign to the qubit I11>?
This is given in the Grover's Algorithm part of the Qiskit textbook
Avatar
Anonymous 22-Jul-20 07:43 AM
oracle is not a control x gate
Avatar
Anonymous 22-Jul-20 07:43 AM
Sorry, controlled Z
Yeah my bad
Avatar
Anonymous 22-Jul-20 07:43 AM
okay
Avatar
Anonymous 22-Jul-20 07:43 AM
I read it wrong
Apologies
Avatar
Anonymous 22-Jul-20 07:43 AM
@Anonymous I am getting this error while running the grader, can you help me with this:-
Avatar
Anonymous 22-Jul-20 07:44 AM
@Anonymous I am getting this error while running the grader, can you help me with this:-
@Anonymous cant see the error to blurry
Apologies
@Anonymous just a typo np
i will explain it to you just in a sec
Avatar
Anonymous 22-Jul-20 07:46 AM
Avatar
Anonymous 22-Jul-20 07:48 AM
@Anonymous
Avatar
Anonymous 22-Jul-20 07:48 AM
Avatar
Anonymous 22-Jul-20 07:56 AM
where are they going to post links for todays lecture?It was mentioned that they are gonna post links in discord from day 3 onwards
Avatar
Anonymous 22-Jul-20 07:56 AM
In grover's algorithm, if the winning qubit is I11>, then the oracle is a controlled X gate. How does the controlled X gate apply a minus sign to the qubit I11>?
@Anonymous okay i have an idea. you know Z|1> = -|1> and Z|0> = |0> right. if not then you can do matrix multiplication to see that. now he have a H on both qubits . when we have a |1> in control qubit the Z in the target qubit will be activated right. Now the target qubit has a H it self so if we get |1> on control and |0> on target nothing will happen. but if we get |1> as control and |1> as target then the target qubit will be Z|1> = -|1> making cZ|11> = -|11>. and in any other case cZ|00> = |00>,cZ|10> = |10> and cZ|01> = |01> as Z|0> = |0>
ask if you didnt get it
Avatar
Anonymous 22-Jul-20 07:57 AM
@Anonymous okay i have an idea. you know Z|1> = -|1> and Z|0> = |0> right. if not then you can do matrix multiplication to see that. now he have a H on both qubits . when we have a |1> in control qubit the Z in the target qubit will be activated right. Now the target qubit has a H it self so if we get |1> on control and |0> on target nothing will happen. but if we get |1> as control and |1> as target then the target qubit will be Z|1> = -|1> making cZ|11> = -|11>. and in any other case cZ|00> = |00>,cZ|10> = |10> and cZ|01> = |01> as Z|0> = |0>
@Anonymous Yes I got it. Thanks!
Avatar
Anonymous 22-Jul-20 08:05 AM
@Anonymous Asfaw @Anonymous I updated the grade.py file, but now I'm getting another error.
(edited)
Avatar
Anonymous 22-Jul-20 08:08 AM
@Anonymous Tag any of the mentor too
Avatar
Anonymous 22-Jul-20 08:09 AM
@Anonymous Please look into this
Avatar
Anonymous 22-Jul-20 08:09 AM
@Anonymous Tag any of the mentor too
@Anonymous Thanks for the suggestion!
Avatar
Anonymous 22-Jul-20 08:09 AM
It says KeyError: 'session'
Avatar
Anonymous 22-Jul-20 08:11 AM
@Anonymous Please look into this
@Anonymous Fitter Thanks, looking into this!
Avatar
Anonymous 22-Jul-20 08:12 AM
Yeah I got this error too @Anonymous
Avatar
Anonymous 22-Jul-20 08:12 AM
It says KeyError: 'session'
@Anonymous Fitter yup i know. many people still getting the error
try restarting the jupyter notebook after you replace the new grader
Avatar
Anonymous 22-Jul-20 08:13 AM
@Anonymous please look into the submission of lab2. Getting error even after updating the grader file.
Avatar
Anonymous 22-Jul-20 08:18 AM
@Anonymous looking into it
Avatar
Anonymous 22-Jul-20 08:20 AM
@Anonymous How do we upgrade the grader file?
Avatar
Anonymous 22-Jul-20 08:20 AM
@Anonymous Ghosh you will find it in resources
Avatar
Anonymous 22-Jul-20 08:21 AM
And what do we do next?
Avatar
Anonymous 22-Jul-20 08:22 AM
I am getting this error when running the last bit of code, any help?
Avatar
Anonymous 22-Jul-20 08:23 AM
I am getting this error when running the last bit of code, any help?
@Anonymous is it a session error
Avatar
Anonymous 22-Jul-20 08:23 AM
sorry what do you mean by that?
Avatar
Anonymous 22-Jul-20 08:24 AM
if its the session or update error then you are not alone
Avatar
Anonymous 22-Jul-20 08:24 AM
it is saying list index out of range
Avatar
Anonymous 22-Jul-20 08:24 AM
sorry what do you mean by that?
@Anonymous you are not talking about the last part then. Its the second last. (edited)
show me your code
Avatar
Anonymous 22-Jul-20 08:25 AM
Avatar
Anonymous 22-Jul-20 08:25 AM
your oracle matrix is []
Avatar
Anonymous 22-Jul-20 08:25 AM
Can anyone instruct me how and what to do with the grade.py file
Can anyone instruct me how and what to do with the grade.py file
@Anonymous Ghosh and what do we replace it with
Avatar
Anonymous 22-Jul-20 08:26 AM
Can anyone instruct me how and what to do with the grade.py file
@Anonymous Ghosh download it and replace it with the old graded file in lab folder
Avatar
Anonymous 22-Jul-20 08:27 AM
Where's the download link?
Avatar
Anonymous 22-Jul-20 08:27 AM
#lab-exercises
Avatar
Anonymous 22-Jul-20 08:27 AM
O ok..nevermind .thanks a lottt
Avatar
Anonymous 22-Jul-20 08:27 AM
@Anonymous should i put [1, 42] inside the brackets?
Avatar
Anonymous 22-Jul-20 08:27 AM
@Anonymous should i put [1, 42] inside the brackets?
@Anonymous no
your oracle matrix should be a 2^n dimensional square matrix
with all off diagonal element zero
all diagonal element which have index = [indices_to_mark,indices_to_mark] should be -1 and other diagonal term = 1
You can check out the lecture once more if you have some confusion. It would be good for you.
Avatar
Anonymous 22-Jul-20 08:31 AM
changed it to this but still another error pops up
Avatar
Anonymous 22-Jul-20 08:31 AM
it's of size 2^n
Avatar
Anonymous 22-Jul-20 08:31 AM
changed it to this but still another error pops up
@Anonymous 2^n matrix i said
and use oracle_matrix[i,i] incited of [i][i] (edited)
Avatar
Anonymous 22-Jul-20 08:34 AM
Thanks for your patience finally got this
Avatar
Anonymous 22-Jul-20 08:34 AM
Can anybody help me with the diffuser part of the code
Avatar
Anonymous 22-Jul-20 08:35 AM
Can anybody help me with the diffuser part of the code
@Anonymous sure
Avatar
Anonymous 22-Jul-20 08:35 AM
@Anonymous congrats
Avatar
Anonymous 22-Jul-20 08:36 AM
Thanks for your patience finally got this
@Anonymous no problem always there to help.
Can anybody help me with the diffuser part of the code
@Anonymous send the error you getting
Avatar
Anonymous 22-Jul-20 08:36 AM
ohh no it s this now😩
Avatar
Anonymous 22-Jul-20 08:37 AM
@Anonymous I'm getting KeyError: 'session', even after updating grade.py. Pls support
Avatar
Anonymous 22-Jul-20 08:37 AM
What is the n here?
Avatar
Anonymous 22-Jul-20 08:38 AM
Avatar
Anonymous 22-Jul-20 08:38 AM
What is the n here?
@Anonymous cant see it its too blurry
use discord on pc and send a screenshot
Avatar
Anonymous 22-Jul-20 08:41 AM
@Anonymous still not working, getting the same error!
Avatar
Anonymous 22-Jul-20 08:42 AM
What's the error now?
Avatar
Anonymous 22-Jul-20 08:42 AM
What's the error now?
@Anonymous same KeyError: 'session'
Avatar
Anonymous 22-Jul-20 08:43 AM
Getting the same error.... as @Anonymous Joy
Avatar
Anonymous 22-Jul-20 08:43 AM
>
@Anonymous same KeyError: 'session' @Anonymous Joy https://discordapp.com/channels/729706617951485954/734920281755353161/735475119308144680 try this
Avatar
Anonymous 22-Jul-20 08:45 AM
@Anonymous same KeyError: 'session'
@Anonymous Joy try optimization level=3
Avatar
Anonymous 22-Jul-20 08:45 AM
same KeyError: 'session'
Avatar
Anonymous 22-Jul-20 08:46 AM
Once again error man
Avatar
Anonymous 22-Jul-20 08:46 AM
@Anonymous I tried the updated grade.py file but Im still getting the same "is_valid" error again
Avatar
Anonymous 22-Jul-20 08:46 AM
just relax guys
Avatar
Anonymous 22-Jul-20 08:46 AM
Avatar
Anonymous 22-Jul-20 08:47 AM
@Anonymous the same error again
Avatar
Anonymous 22-Jul-20 08:47 AM
@Anonymous @Anonymous try doing optimization_level=3
Avatar
Anonymous 22-Jul-20 08:47 AM
I updated but still got the same error
Avatar
Anonymous 22-Jul-20 08:47 AM
Me too
Avatar
Anonymous 22-Jul-20 08:48 AM
when did you update?
ok I see
Avatar
Anonymous 22-Jul-20 08:48 AM
Also important: After updating the grader file: Restart the Jupyter Kernel. Go to Kernel, click Restart and Clear Output. Run all cells again (edited)
👍 1
Avatar
Anonymous 22-Jul-20 08:48 AM
>
@Anonymous @Anonymous try doing optimization_level=3 @Anonymous Thanks, this worked!
Avatar
Anonymous 22-Jul-20 08:48 AM
Pinned a message.
Avatar
Anonymous 22-Jul-20 08:48 AM
@Anonymous the same error again
@Anonymous also not showing first lab submission status..
Avatar
Anonymous 22-Jul-20 08:49 AM
@Anonymous I tried with optimization_level = 3 @Anonymous I did this after restarting kernel, but the error still persists
Avatar
Anonymous 22-Jul-20 08:50 AM
@Anonymous I tried with optimization_level = 3 @Anonymous I did this after restarting kernel, but the error still persists
@Anonymous Ok, we'll trouble shoot. Give us a moment while you can relax and watch the lecture in a bit
👍 2
Avatar
Anonymous 22-Jul-20 08:57 AM
Tried every possible combinations @Anonymous ... None of it seems to work
Avatar
Anonymous 22-Jul-20 08:59 AM
@Anonymous Ghosh give us a moment. we're debugging
Avatar
Anonymous 22-Jul-20 09:05 AM
is it normal that the last step takes longer time to execute?
i executed the last step approx 5 mins ago
and its still executing, as in the final result is not in yet
Avatar
Anonymous 22-Jul-20 09:07 AM
Morning! (edited)
Avatar
Anonymous 22-Jul-20 09:16 AM
After
Morning!
@Anonymous Afternoon 😄
😆 1
Avatar
Anonymous 22-Jul-20 09:17 AM
I have this but still have errors
👍 1
Avatar
Anonymous 22-Jul-20 09:20 AM
I have this but still have errors
@Anonymous very possible the server still has a ubisoft problem
Avatar
Anonymous 22-Jul-20 09:21 AM
Tried every possible combinations @Anonymous ... None of it seems to work
@Anonymous Ghosh have you also tried to set optimization_level = 3 ?
qiskitsmart 1
Avatar
Anonymous 22-Jul-20 09:23 AM
Whats the difference between a register and a state?
Avatar
Anonymous 22-Jul-20 09:24 AM
Whats the difference between a register and a state?
@Anonymous Register contains qubits/classical bits and a state is well the state of a qubit
Avatar
Anonymous 22-Jul-20 09:26 AM
how do i remove this error
Avatar
Anonymous 22-Jul-20 09:27 AM
@Anonymous srinivas It's a server error. Try setting the optimization =3 and resubmit.
Avatar
Anonymous 22-Jul-20 09:29 AM
Can someone please help me out as to this error?
Avatar
Anonymous 22-Jul-20 09:29 AM
@Anonymous So is |x> symbol representing a register or state?
Avatar
Anonymous 22-Jul-20 09:30 AM
@Anonymous So is |x> symbol representing a register or state?
@Anonymous I believe state, but you could say register too the state represents the "state" of all qubits in the register (edited)
Avatar
Anonymous 22-Jul-20 09:32 AM
@Anonymous Maybe you are missing a part for the append in your diffuser function?
Avatar
Anonymous 22-Jul-20 09:35 AM
@Anonymous I added the phase Oracle after applying the hadamard gates to each of the qubits, as mentioned in the procedure
Avatar
Anonymous 22-Jul-20 09:35 AM
Are these lectures accessible after this school ends too ?
Avatar
Anonymous 22-Jul-20 09:36 AM
setting optimization level to 3 solved the problem thanks!!!!
Avatar
Anonymous 22-Jul-20 09:37 AM
@Anonymous Okay, I see the issue now. 1) your phase oracle needs some inputs 2) you need a range(n) So it should look like qc.append(phase_oracle(inputs), range(n)) to fully work
Avatar
Anonymous 22-Jul-20 09:37 AM
@Anonymous i tried resetting the optimisation to 3 and it is still giving the same error
Avatar
Anonymous 22-Jul-20 09:38 AM
@Anonymous srinivas The mentors are working on a solution but it's more or less keep trying until it accepts your answer. It took me like 10 tries. 😅
Avatar
Anonymous 22-Jul-20 09:39 AM
@Anonymous okay trying, thanks tho
Avatar
Anonymous 22-Jul-20 09:41 AM
setting optimization level to 3 solved the problem thanks!!!!
@Anonymous how did you made it?
Avatar
Anonymous 22-Jul-20 09:42 AM
@Anonymous it worked, thanks
👍 1
Avatar
Anonymous 22-Jul-20 09:43 AM
@Anonymous very possible the server still has a ubisoft problem
@Anonymous Using Optimization_level=3 worked
Avatar
Anonymous 22-Jul-20 09:44 AM
could you explain to me how to do that?
Avatar
Anonymous 22-Jul-20 09:47 AM
In the submission cell, there is a keyword argument optimization_level=0, change it to optimization_level=3
Seems to work for some people
👍 1
Avatar
Anonymous 22-Jul-20 09:48 AM
thanks
let me try it
Avatar
Anonymous 22-Jul-20 09:48 AM
it worked for me after 3 times
👍 1
Avatar
Anonymous 22-Jul-20 09:50 AM
Pinned a message.
Avatar
Anonymous 22-Jul-20 09:50 AM
I'm not getting the right answer, I think there's something wrong with my phase Oracle, can someone see what is the mistake?
Avatar
Anonymous 22-Jul-20 09:51 AM
I'm not getting the right answer, I think there's something wrong with my phase Oracle, can someone see what is the mistake?
@Anonymous you have to loop over indices_to_mark not the number of qubits
Avatar
Anonymous 22-Jul-20 09:52 AM
I can't understand, can you please elaborate?
@Anonymous
Avatar
Anonymous 22-Jul-20 09:53 AM
You have a matrix of dimensions 2^n x 2^n and with "for i in range(n)" you are looping from 0 to n and then comparing this value with the indices marked that goes from 0 to 2^n
Avatar
Anonymous 22-Jul-20 09:54 AM
Oh, right
Thanks
👍 1
Lemme try it
Avatar
Anonymous 22-Jul-20 09:57 AM
tried this 5 times and nothing is happening after setting optimization to 3
Avatar
Anonymous 22-Jul-20 09:58 AM
same
takes forever and then error
Avatar
Anonymous 22-Jul-20 09:58 AM
@Anonymous first yiu have to change the folder to the new one
Avatar
Anonymous 22-Jul-20 09:59 AM
@Anonymous why?
Avatar
Anonymous 22-Jul-20 09:59 AM
they just sent it
put this in grading tools
replace the old one in grading tools
then restart kernel
Avatar
Anonymous 22-Jul-20 10:03 AM
it worked for me after 3 times
@Anonymous Cantu thanks!!! finally
it works
and thanks everyone, I know you are doing the best
✌️
Avatar
Anonymous 22-Jul-20 10:06 AM
@Anonymous Thanks it worked. (edited)
qiskitsmart 1
Avatar
Anonymous 22-Jul-20 10:07 AM
Can any @Anonymous tell me it is said that minimum 65% is required to pass the labs. So its like 65% of total 10 labs or minimum 65% marks in each lab(which does not seem to be the case)
Avatar
Anonymous 22-Jul-20 10:07 AM
Still not getting the right answer with the given phase Oracle, can someone point out what's wrong? @Anonymous
Avatar
Anonymous 22-Jul-20 10:11 AM
@Anonymous why i+1?
@Anonymous indices_to_mark is list while i is just a number. if will never triger
Avatar
Anonymous 22-Jul-20 10:14 AM
@Anonymous why i+1?
@Anonymous Because if 0 is in the list of indices to mark, then the first diagonal element needs to be changed to -1, hence the i+1
@Anonymous indices_to_mark is list while i is just a number. if will never triger
@Anonymous Oh
Avatar
Anonymous 22-Jul-20 10:14 AM
@Anonymous python indexing starts at 0
Avatar
Anonymous 22-Jul-20 10:15 AM
@Anonymous also python indices start at 0, the first diagonal element is 0,0 not 1,1
👍 1
a more python-friendly way of typing your solution is => for ind in indices_to_mark: oracle_matrix[ind,ind] = -1
that way you only iterate through the necessary indices
instead of going through each index
Avatar
Anonymous 22-Jul-20 10:16 AM
Hmmm, lemme try that
Avatar
Anonymous 22-Jul-20 10:25 AM
@Anonymous you gave the solution away 😉
Avatar
Anonymous 22-Jul-20 10:27 AM
just trying to help hehe
Avatar
Anonymous 22-Jul-20 10:29 AM
@Anonymous you are working too hard! :P)
Avatar
Anonymous 22-Jul-20 10:36 AM
Can any @Anonymous tell me it is said that minimum 65% is required to pass the labs. So its like 65% of total 10 labs or minimum 65% marks in each lab(which does not seem to be the case)
@Anonymous R It is minimum 65% for every lab
Avatar
Anonymous 22-Jul-20 10:36 AM
what does 65% mean for every lab?
Avatar
Anonymous 22-Jul-20 10:48 AM
tried this 5 times and nothing is happening after setting optimization to 3
@Anonymous I'm facing same error.
Avatar
Anonymous 22-Jul-20 10:52 AM
Avatar
Anonymous 22-Jul-20 10:59 AM
Avatar
Anonymous 22-Jul-20 10:59 AM
I made the simulation and got this values. I suspect those probabilities are too low, aren't they?
💯 1
Avatar
Anonymous 22-Jul-20 11:01 AM
@Anonymous something is not right with your answer; it looks like not enough rotations for amplitude amplification
Avatar
Anonymous 22-Jul-20 11:01 AM
👍🏻 1
Avatar
Anonymous 22-Jul-20 11:02 AM
@Anonymous something is not right with your answer; it looks like not enough rotations for amplitude amplification
@Anonymous That explains why I got a wrong answer after changing the optimization level xDDD
@Anonymous I'm going to upload my phase_oracle an diffuser
I think the mistake might be in the diffuser
Avatar
Anonymous 22-Jul-20 11:07 AM
@Anonymous the diffuser matrix is an identity matrix also with the top left most element equal to minus one
Avatar
Anonymous 22-Jul-20 11:08 AM
@Anonymous the diffuser matrix is an identity matrix also with the top left most element equal to minus one
@Anonymous Atallah Isn't that matrix the oracle_matrix?
Avatar
Anonymous 22-Jul-20 11:14 AM
@Anonymous Not quite. You pass indices to the oracle_matrix to make those elements equal to minus one. The diffuser matrix is a specific case of the oracle_matrix.
👍 1
Well part of it is anyway. The diffuser matrix requires some other gates as well.
Avatar
Anonymous 22-Jul-20 11:16 AM
I tried to follow the example shown on the qiskit textbook but I think the generalization from 3 to n qubits is wrong
(the generalization I made, I mean xD)
I'll check the notes
from the lectures
Avatar
Anonymous 22-Jul-20 11:18 AM
Downloading the new grader and restarting the kernel with optimization level=3 does work
👍 3
Thanks to all the @Anonymous and other people who helped out
💯 2
Avatar
Anonymous 22-Jul-20 11:21 AM
@Anonymous The lab has been simplified so you don't need as many gates as the textbook. This tells you how to implement it 😉
Avatar
Anonymous 22-Jul-20 11:22 AM
@Anonymous use phase_oracle on qubit 0 in your diffuser
Avatar
Anonymous 22-Jul-20 11:25 AM
For everyone, with error in second lab check #lab-exercises https://discordapp.com/channels/729706617951485954/729709899260362832/735509099034443836
👍 2
Avatar
Anonymous 22-Jul-20 11:54 AM
where can we find the lab solutions ?
Avatar
Anonymous 22-Jul-20 11:55 AM
@Anonymous @Anonymous Got it. I'll do it
Avatar
Anonymous 22-Jul-20 11:55 AM
The Youtube series going live soon is not mandatory for us but optional, is it correct?
Avatar
Anonymous 22-Jul-20 11:55 AM
@Anonymous new error with the new grade.py: 'is_valid' (edited)
Avatar
Anonymous 22-Jul-20 11:57 AM
@Anonymous Mecchina That is correct. The Youtube is separate from this Summer School.
👍 1
Avatar
Anonymous 22-Jul-20 11:58 AM
Qiskit Live now on Youtube: https://youtu.be/zHKdx13iD1o
Speaker: Julien Gacon Topic: Circuits in Quantum Algorithms Notebook: https://github.com/Cryoris/notebooks/blob/master/Circuits%20in%20Quantum%20Algorithms.ipynb Documentation: http://qisk.it/circuits The power of quantum algorithms is rooted in the circuits they run. In thi...
Avatar
Anonymous BOT 22-Jul-20 12:04 PM
Day 1 Lecture: https://www.crowdcast.io/e/qgss-day1 / password: qiskitday1 Lecture Notes: https://ibm.box.com/s/0sa9r0z09brfjvot9yfwg6b3yma9uvkq Day 2 Day 2 Lecture: https://www.crowdcast.io/e/qgss-day2 / password: qiskitday2 Lecture Notes: https://ibm.box.com/s/0ieahmfu4hbuyuglppqbm7ibv9mz8sif Day 3 Day 3 Lecture: https://www.crowdcast.io/e/qgss-day3 / password: qiskitday3 Lecture Notes: Coming Soon!
Avatar
Anonymous 22-Jul-20 12:08 PM
Can you help me regarding this error????
Avatar
Anonymous 22-Jul-20 12:09 PM
Can you help me regarding this error????
@Anonymous you can open discord in your laptop in chrome as well. it will be easy to take screenshot of error and paste it in the discord that way. it will be easy to read the error as well
Avatar
Anonymous 22-Jul-20 12:09 PM
You can zoom it out
Then I think it will be visible
Avatar
Anonymous 22-Jul-20 12:10 PM
I am not able to submit the notebook Kindly help
Avatar
Anonymous 22-Jul-20 12:11 PM
In the instructions group they have attached one zip file....unzip it paste to your original folder
Avatar
Anonymous 22-Jul-20 12:12 PM
This is about lab 1
Avatar
Anonymous 22-Jul-20 12:23 PM
@Anonymous Saxena Please use it inside the lab folder.
Avatar
Anonymous 22-Jul-20 12:23 PM
Hi i am getting the following import errors for some reason can someone help me ImportError: cannot import name 'Statevector' from 'qiskit.quantum_info' (unknown location)
Avatar
Anonymous 22-Jul-20 12:28 PM
Hi i am getting the following import errors for some reason can someone help me ImportError: cannot import name 'Statevector' from 'qiskit.quantum_info' (unknown location)
@Anonymous Upload the screenshot of your errors
Finally, phew 🙂
Avatar
Anonymous 22-Jul-20 12:31 PM
I am getting this error continuously I have tried uninstalling the package and reinstalling it I have also tried uninstalling and reinstalling primary dependencies but looks like that isnt working either.
Avatar
Anonymous 22-Jul-20 12:32 PM
@Anonymous dm me with full screenshot
Avatar
Anonymous BOT 22-Jul-20 12:50 PM
Day 1 Lecture: https://www.crowdcast.io/e/qgss-day1 / password: qiskitday1 Lecture Notes: https://ibm.box.com/s/0sa9r0z09brfjvot9yfwg6b3yma9uvkq Day 2 Day 2 Lecture: https://www.crowdcast.io/e/qgss-day2 / password: qiskitday2 Lecture Notes: https://ibm.box.com/s/0ieahmfu4hbuyuglppqbm7ibv9mz8sif Day 3 Day 3 Lecture: https://www.crowdcast.io/e/qgss-day3 / password: qiskitday3 Lecture Notes: Coming Soon!
Avatar
Anonymous 22-Jul-20 12:55 PM
@Anonymous Correect line is : qc.append(phase_oracle(n,[0]),range(n)) put square bracket [0].
Avatar
Anonymous BOT 22-Jul-20 01:02 PM
Command List (brought to you by !commands) General Info !schedule | View general daily schedule and key times !channels | View linked index of all server channels !streamtips | View some tips on how to optimize your stream during lectures !link | Displays links for lectures and lecture notes Questions and Support !raisehand| Let the mentors know you have a question or are looking for support !preqeq | View resources to support learning the Summer School Prerequisites !faq | See the frequently asked questions (and answers!) Learning Together !norms | View event norms !CodeofConduct | View Code of Conduct Miscellaneous !settimezone | Set your time zone for other students and mentors to see !fun | View some of the miscellaneous fun that may be available
A university quantum algorithms/computation course supplement based on Qiskit
Sal explains what it means to multiply two matrices, and gives an example.
Avatar
Anonymous 22-Jul-20 01:05 PM
I can´t acces today's lab session...
Avatar
Anonymous 22-Jul-20 01:06 PM
It's not out yet.
Avatar
Anonymous 22-Jul-20 01:06 PM
have you posted the link yet?
Ah, thanks!:smile
👍 1
😄
Avatar
Anonymous 22-Jul-20 01:07 PM
I think it posts soon.
Avatar
Anonymous 22-Jul-20 01:08 PM
maybe they are waiting until the youtube conference ends
Avatar
Anonymous 22-Jul-20 01:09 PM
I am using discord on my phone.whats the first step in starting a lab?
Avatar
Anonymous 22-Jul-20 01:10 PM
Will there be a lab on the 31st?
Avatar
Anonymous 22-Jul-20 01:11 PM
is there a lecture on that day? (edited)
Avatar
Anonymous 22-Jul-20 01:13 PM
Do we have a lab today ?
Avatar
Anonymous 22-Jul-20 01:14 PM
yeah.
Avatar
Anonymous 22-Jul-20 01:14 PM
@Anonymous Majboor there is panel discussion quantum carreers with Jay Gambetta
Avatar
Anonymous 22-Jul-20 01:15 PM
labtime
Avatar
Anonymous 22-Jul-20 01:19 PM
Not yet I think. It is still not posted on #lab-exercises
Avatar
Anonymous 22-Jul-20 01:19 PM
it is me or the Lab 3 is not out yet
Not yet I think. It is still not posted on #lab-exercises
@Anonymous OK
Avatar
Anonymous 22-Jul-20 01:20 PM
it is not out ..:(
😩 2
Avatar
Anonymous 22-Jul-20 01:21 PM
I still could not start the lab1 & lab2. Still studying from qiskit’s textbook. Is there anyone like me?
👍 1
Avatar
Anonymous 22-Jul-20 01:21 PM
Yeah me too
Avatar
Anonymous 22-Jul-20 01:21 PM
Or everyone is done with the lab1&lab2?
Avatar
Anonymous 22-Jul-20 01:21 PM
hoping to get some time to do the lab tomorrow
Avatar
Anonymous 22-Jul-20 01:21 PM
God, what a relief! 😆
I thought everyone did them
Anyway I am Still learning from qiskit’s textbook
I will catch 💪💪💪
Avatar
Anonymous 22-Jul-20 01:23 PM
good luck!
Avatar
Anonymous 22-Jul-20 01:23 PM
Thanks, you too 🙃
Avatar
Anonymous 22-Jul-20 01:23 PM
thanks!
Avatar
Anonymous 22-Jul-20 01:24 PM
@Anonymous i still font know how to start the jupytet lab
Avatar
Anonymous 22-Jul-20 01:24 PM
sure will catch up, I did only lab1 .. lab2 is pending.. 🙂
Avatar
Anonymous 22-Jul-20 01:24 PM
I still could not start the lab1 & lab2. Still studying from qiskit’s textbook. Is there anyone like me?
@Anonymous me too! Difficult to catch up for super beginners😂
Avatar
Anonymous 22-Jul-20 01:26 PM
Are the labs out yet?
quantum 3
Avatar
Anonymous 22-Jul-20 01:26 PM
Are the labs out yet?
@Anonymous Singh Not yet !
waiting
Avatar
Anonymous 22-Jul-20 01:26 PM
Thank you
Avatar
Anonymous 22-Jul-20 01:26 PM
@Anonymous MAybe this is useful
Avatar
Anonymous 22-Jul-20 01:26 PM
try to read old message for help of lab 1 and lab2
Avatar
Anonymous BOT 22-Jul-20 01:26 PM
Daily Schedule Times Presented in EDT (UTC -04) 8:30 AM : Daily Update Posted in Discord & Emailed - including Lecture Link & Password 9:00 AM : Lecture Begins via Crowdcast 12:00 PM : Lecture Ends via Crowdcast 12:30 PM : Lecture Notes & Recording Link Posted in Discord   1:00 PM : Lab Session Access Link & Notebook Posted in Discord 1:30 PM : Previous Day Lab Work Solution Posted in Discord
Avatar
Anonymous 22-Jul-20 01:26 PM
Learn how to install Qiskit, the open source quantum computing framework, onto a Mac, Windows and Linux machine. Your formal invite to weekly Qiskit videos ► https://ibm.biz/q-subscribe Episode 3 will come out August 16th! Getting Started – https://ibm.biz/qiskit-github Docu...
Avatar
Anonymous 22-Jul-20 01:26 PM
I think there are some ppl, who could not start or still learning the basics. We should colloborate as beginners. Do labs together and etc. otherwise when time passed ppl will solve later labs and forget details about the previous ones. While we still have a chance to ask lab 1 and 2, we should finish it in the first week to catch them.
👍 3
Avatar
Anonymous 22-Jul-20 01:27 PM
Maybe this is useful for jupyter notebooks and instalation @Anonymous
Avatar
Anonymous 22-Jul-20 01:28 PM
May be we should contact some mentors as super beginners.
When time pass we may not catch up. 😔
😢 1
Avatar
Anonymous 22-Jul-20 01:30 PM
Where is lab?
Avatar
Anonymous 22-Jul-20 01:30 PM
is there a lab3 exercise today?
Avatar
Anonymous 22-Jul-20 01:30 PM
There is wait for sometime
Avatar
Anonymous 22-Jul-20 01:30 PM
you should watch the lectures by abe
Avatar
Anonymous 22-Jul-20 01:30 PM
nowhere😫
Avatar
Anonymous 22-Jul-20 01:30 PM
Ig so...but why is it not yet uploaded?
Avatar
Anonymous 22-Jul-20 01:30 PM
Learn to program quantum computers with Qiskit.
👍 2
to all the beginners
Avatar
Anonymous 22-Jul-20 01:31 PM
yeah. The whole series are great
Abe is the best!
Avatar
Anonymous 22-Jul-20 01:31 PM
and you guys can ask anything even though its trivial
will be pleased to help
Avatar
Anonymous 22-Jul-20 01:31 PM
No lab yet... Right??
Avatar
Anonymous 22-Jul-20 01:32 PM
nop
Avatar
Anonymous 22-Jul-20 01:32 PM
right
Avatar
Anonymous 22-Jul-20 01:32 PM
you will get lots of qiskiters that are willing to help beginners
No lab yet... Right??
@Anonymous Vaishnav yum no sign of lab 3 yet
Avatar
Anonymous 22-Jul-20 01:33 PM
I am a beginer myself, but if I can help in someting, here I am
Avatar
Anonymous 22-Jul-20 01:34 PM
Would be nice to know if we are to expect a delay in uploading the instructions for the lab.. It's 01:32am where I live and having normal working hours the during the day, it would have helped to just go to sleep and do the lab the next day. 😦 (edited)
👍 2
Avatar
Anonymous 22-Jul-20 01:35 PM
@Anonymous me too! Difficult to catch up for super beginners😂
@Anonymous we are in the same situation
Avatar
Anonymous 22-Jul-20 01:35 PM
@Anonymous I have been facing with this problem for last three day. I tried to resolve it by uninstalling all the dependencies and reinstalling them and then install qiskit. That did not work.
Avatar
Anonymous 22-Jul-20 01:35 PM
Would be nice to know if we are to expect a delay in uploading the instructions for the lab.. It's 01:32am where I live and having normal working hours the during the day, it would have helped to just go to sleep and do the lab the next day.
@Anonymous we dont know anything it never took this long. i guess it will be uploaded any minute now
Avatar
Anonymous 22-Jul-20 01:35 PM
Does anyone have any idea why measuring two qubits simultaneously in the same line throw Circuit Error while measuring in two lines does not?
Avatar
Anonymous 22-Jul-20 01:35 PM
@Anonymous I have been facing with this problem for last three day. I tried to resolve it by uninstalling all the dependencies and reinstalling them and then install qiskit. That did not work.
@Anonymous run from starting
not from middle
Avatar
Anonymous 22-Jul-20 01:36 PM
Avatar
Anonymous 22-Jul-20 01:36 PM
@Anonymous Yeah, not to be rude; I understand that there may be some technical issues given the amount of students enrolled. Still, an update would have been nice. (edited)
Avatar
Anonymous 22-Jul-20 01:36 PM
YOu need to import stuffs that has been listed in above cells
Avatar
Anonymous 22-Jul-20 01:37 PM
I had to measure the two qubits in two separate lines
Avatar
Anonymous 22-Jul-20 01:37 PM
@Anonymous what's error otherwise?
Avatar
Anonymous 22-Jul-20 01:37 PM
I'm getting this error for lab2 on submitting: HTTPError: 400 Client Error: Bad Request for url: https://eu-gb.functions.cloud.ibm.com/api/v1/web/salvador.de.la.puente.gonzalez%40ibm.com_dev/default/qgss_grading/validate-answer
Avatar
Anonymous 22-Jul-20 01:37 PM
@Anonymous did you update the grading.py file?
Avatar
Anonymous 22-Jul-20 01:38 PM
@Anonymous I get Circuit Error if I measure two qubits on the same line
Avatar
Anonymous 22-Jul-20 01:38 PM
Yes @Anonymous
Avatar
Anonymous 22-Jul-20 01:38 PM
@Anonymous I get Circuit Error if I measure two qubits on the same line
@Anonymous Can you show that error
Avatar
Anonymous 22-Jul-20 01:38 PM
@Anonymous I have been facing with this problem for last three day. I tried to resolve it by uninstalling all the dependencies and reinstalling them and then install qiskit. That did not work.
@Anonymous use these commands in sequence
Avatar
Anonymous 22-Jul-20 01:38 PM
@Anonymous How did you install jupyter?
Avatar
Anonymous 22-Jul-20 01:38 PM
conda update jupyter
Avatar
Anonymous 22-Jul-20 01:38 PM
@Anonymous I haven't submitted my lab yet.
Avatar
Anonymous 22-Jul-20 01:38 PM
pip install --upgrade pip --user
pip install websockets --upgrade
Avatar
Anonymous 22-Jul-20 01:39 PM
Yes @Anonymous
@Anonymous after updating do delete the pycache folder and previous answer.enc file
Avatar
Anonymous 22-Jul-20 01:39 PM
pip install qiskit
Avatar
Anonymous 22-Jul-20 01:39 PM
@Anonymous I haven't submitted my lab yet.
@Anonymous Don't submit it just show the error
Avatar
Anonymous 22-Jul-20 01:39 PM
it is working in windows environment
Avatar
Anonymous 22-Jul-20 01:40 PM
@Anonymous Majboor there is panel discussion quantum carreers with Jay Gambetta
@Anonymous Oh where is this?
Avatar
Anonymous 22-Jul-20 01:40 PM
@Anonymous
@Anonymous That's the error I get
Avatar
Anonymous 22-Jul-20 01:40 PM
Any information regarding the labs?
Avatar
Anonymous 22-Jul-20 01:41 PM
@Anonymous this might be clear
Avatar
Anonymous 22-Jul-20 01:41 PM
Hey @Anonymous you go to USC?
Avatar
Anonymous 22-Jul-20 01:41 PM
@Anonymous McGaha Hey Ryan, how are you?
@Anonymous McGaha Good to see you
Avatar
Anonymous 22-Jul-20 01:42 PM
clbit1_Alice has a classical register it seems
Avatar
Anonymous 22-Jul-20 01:42 PM
Is lab3 posted yet?
Avatar
Anonymous 22-Jul-20 01:42 PM
so I think the index of that must be used
Avatar
Anonymous 22-Jul-20 01:43 PM
!links
lecture notes are out
Avatar
Anonymous 22-Jul-20 01:43 PM
Abe typing at #lab-exercises go go go
Avatar
Anonymous 22-Jul-20 01:43 PM
@Anonymous You too dude.
Avatar
Anonymous 22-Jul-20 01:43 PM
@Anonymous me too
Avatar
Anonymous 22-Jul-20 01:44 PM
@Anonymous going to sleep and attempting lab in the morning seems like a good deal here cause i dont think it gonna be uploaded for a while
👍 1
Avatar
Anonymous 22-Jul-20 01:44 PM
@Anonymous That was the issue. Thanks so much buddy.
Avatar
Anonymous 22-Jul-20 01:44 PM
@Anonymous I'm getting the same error
Avatar
Anonymous 22-Jul-20 01:44 PM
I am glad I could help
Avatar
Anonymous 22-Jul-20 01:45 PM
@Anonymous so after installing qiskit, how do i start lab1?
Avatar
Anonymous 22-Jul-20 01:45 PM
help me please (edited)
Avatar
Anonymous 22-Jul-20 01:45 PM
Seems i was wrong
Avatar
Anonymous 22-Jul-20 01:46 PM
if you have windows search anaconda prompt
then a command window will open
Avatar
Anonymous 22-Jul-20 01:46 PM
Avatar
Anonymous 22-Jul-20 01:46 PM
@Anonymous Haodudin Nurkifli Your diffuser is off
Avatar
Anonymous 22-Jul-20 01:48 PM
@Anonymous McGaha how to create on ?
Avatar
Anonymous 22-Jul-20 01:49 PM
@Anonymous Haodudin Nurkifli You need to make it a matrix with a -1 only in the 0,0 spot, and 1 along the diagonal
@Anonymous Haodudin Nurkifli The code is similar to the phase oracle function
@Anonymous Haodudin Nurkifli Sorry opposite of what I said. 1 in only the 0,0 spot, -1 down the diagonal
Avatar
Anonymous 22-Jul-20 01:52 PM
Are you getting win32 error if you are using windows os
Avatar
Anonymous 22-Jul-20 01:55 PM
If nothing works i would recommend you to copy paste your code in colab
Avatar
Anonymous 22-Jul-20 01:58 PM
@Anonymous How did you install jupyter?
@Anonymous anaconda distn
Avatar
Anonymous 22-Jul-20 01:58 PM
the first function are not end in the lab 3
Avatar
Anonymous 22-Jul-20 02:04 PM
it is working in windows environment
@Anonymous Saxena unfortunately it did not work
Avatar
Anonymous 22-Jul-20 02:05 PM
In lab 2 for the Grover's algorithm quantum circuit, can someone clarify what c_n is for me? Same with the M gates? They don't appear in the Qiskit textbook notes or Elisa's
Avatar
Anonymous 22-Jul-20 02:06 PM
@Anonymous Asfaw @Anonymous ... is there a master copy of everyone's grades, so if I already submitted a correct answer once, it will be recorded as such with the organizers? So if I accidentally change something and can't figure it out, my previous correct attempt will still count. ..... asking for a friend 🤓 (edited)
Avatar
Anonymous 22-Jul-20 02:06 PM
clasicall
sorry for repeat question, i fixed sceenshot mistake. so here, im assuming the y in the exponent and in the ket vector, it increments every iterations, but what do i and x mean?a
Avatar
Anonymous 22-Jul-20 02:08 PM
clasicall
@Anonymous Majboor if c_n represents the classical circuit, why is nothing there until the M gates at the end of the circuit? thanks
Avatar
Anonymous 22-Jul-20 02:09 PM
@Anonymous can we run labs in qexperience?
Avatar
Anonymous 22-Jul-20 02:18 PM
BEcause the M gates indicate the measurements done. NO results can be stored in classical bits until you measure the quantum states and obtain 0's and 1's
Avatar
Anonymous 22-Jul-20 02:19 PM
I can't install other software on my TP as it is my office TP and I m restricted to do so. Is there any other platform where I can run labs ?? Kindly help me on this.
Avatar
Anonymous 22-Jul-20 02:19 PM
BEcause the M gates indicate the measurements done. NO results can be stored in classical bits until you measure the quantum states and obtain 0's and 1's
@Anonymous Thanks for explaining
Avatar
Anonymous 22-Jul-20 02:28 PM
@Anonymous can we run labs in qexperience?
@Anonymous problem is, you can't upload the required grader files
Avatar
Anonymous 22-Jul-20 02:28 PM
@Anonymous Majboor i is the imaginary unit it is equivalent to (sqrt(-1)) . x=|x>and it is the state in the computational basis.
@Anonymous Thanks for explaining
@Anonymous
you are welcome!
Avatar
Anonymous 22-Jul-20 02:34 PM
🥳
qiskitsmart 2
🍉 1
👍 7
If anyone's got any trouble with today's lab, feel free to message me. I'll do my best to help anyone in need
Avatar
Anonymous 22-Jul-20 02:45 PM
ok
Avatar
Anonymous 22-Jul-20 02:49 PM
Sorry i lost track of one thing of the quantum phase estimation, I'd like to review the lecture on the unitary operator exponent (as I've not understood how it works), can someone point to me the video timing or some materials?
Avatar
Anonymous 22-Jul-20 02:50 PM
Had to disable VPN to get grading going! (edited)
Avatar
Anonymous 22-Jul-20 02:51 PM
@Anonymous You can get the link in #lab-exercises btw it's the same link
Avatar
Anonymous 22-Jul-20 02:52 PM
@Anonymous You can get the link in #lab-exercises btw it's the same link
@Anonymous S ye, I'd like to know the minute in which the unitary operator exponent is explained
Avatar
Anonymous 22-Jul-20 02:55 PM
>
@Anonymous S ye, I'd like to know the minute in which the unitary operator exponent is explained @Anonymous Probably in the current case, you should be more interested in diagonal matrix's power
Avatar
Anonymous 22-Jul-20 02:55 PM
#memorable-lecture-notes snapshot of the notes are there that might help you figure out the time as it was posted simultaneously during lecture
Avatar
Anonymous 22-Jul-20 02:56 PM
qiskit.circuit.library.qft(num_qubits).inverse() in using this library function, it is not clear to me where is the name of the circuit i am implementing it on?
Avatar
Anonymous 22-Jul-20 02:56 PM
@Anonymous Asthana after building the QFT dagger it needs to appended to the circuit (edited)
🧐 1
👍 1
Avatar
Anonymous 22-Jul-20 02:56 PM
also where to put the information of which qubits I am putting it on?
Avatar
Anonymous 22-Jul-20 02:57 PM
the 4th one
Avatar
Anonymous 22-Jul-20 02:58 PM
@Anonymous that mignt me around 8:10-8:15 (IST) 1 hrs 40 mints
Avatar
Anonymous 22-Jul-20 02:58 PM
@Anonymous Asthana read quantumcircuit.append() command
👍 3
Avatar
Anonymous 22-Jul-20 02:58 PM
thanks
Avatar
Anonymous 22-Jul-20 03:03 PM
Are we suppose to get as close to theta or exactly ?
Avatar
Anonymous 22-Jul-20 03:05 PM
Done😇
Avatar
Anonymous 22-Jul-20 03:07 PM
@Anonymous Anand for a given parameters, I got an exact answer. However, trying to estimate 0.3 phase gives me 0.31
Avatar
Anonymous 22-Jul-20 03:08 PM
@Anonymous Anand for a given parameters, I got an exact answer. However, trying to estimate 0.3 phase gives me 0.31
@Anonymous I got 0.47 for the given parameters
and the submission marked as correct answer
Avatar
Anonymous 22-Jul-20 03:09 PM
@Anonymous Anand interesting. I run it a few times and was getting 0.5
💯 1
Avatar
Anonymous 22-Jul-20 03:09 PM
@Anonymous I got 0.47 for the given parameters
@Anonymous Anand maybe try increasing the shots. i increased to 5000 and got 0.5
Avatar
Anonymous 22-Jul-20 03:09 PM
@Anonymous Anand maybe try increasing the shots. i increased to 5000 and got 0.5
@Anonymous I'll give it a try
Avatar
Anonymous 22-Jul-20 03:10 PM
Perhaps it also rounds the answer when submitting it
Avatar
Anonymous 22-Jul-20 03:10 PM
@Anonymous Anand , I am getting consistently 0.5 for 1000 shots
Avatar
Anonymous 22-Jul-20 03:10 PM
qiskitwhite 1
this was tricky
Avatar
Anonymous 22-Jul-20 03:11 PM
it is tricky haha
😆 1
Avatar
Anonymous 22-Jul-20 03:12 PM
@Anonymous Anand , I am getting consistently 0.5 for 1000 shots
@Anonymous may be i forgot to add the 2pi difference
💯 1
Avatar
Anonymous 22-Jul-20 03:13 PM
you mean to the exponent as well?
Avatar
Anonymous 22-Jul-20 03:15 PM
given_circuit.u1(theta*exponent/(2pi),target_qubit).control(control_qubit) I am trying to add the unitary operator with exponent with control on control qubit. Is this now how control is used? Can someone help me here please?
not*
given_circuit.u1(theta**exponent/(2pi),target_qubit).control(control_qubit)
Avatar
Anonymous 22-Jul-20 03:16 PM
I think it is cu1 not u1??
Avatar
Anonymous 22-Jul-20 03:17 PM
given_circuit.u1(theta*exponent/(2pi),target_qubit).control(control_qubit) I am trying to add the unitary operator with exponent with control on control qubit. Is this now how control is used? Can someone help me here please?
@Anonymous Asthana use cu1 . check documentation
Avatar
Anonymous 22-Jul-20 03:17 PM
thanks
Avatar
Anonymous 22-Jul-20 03:18 PM
@Anonymous Asthana why do you divide by 2 pi? why do you take power of theta?
Avatar
Anonymous 22-Jul-20 03:18 PM
Has anyone watched the videos multiple times? Does it help?
Avatar
Anonymous 22-Jul-20 03:19 PM
@Anonymous Asthana why do you divide by 2 pi? why do you take power of theta?
@Anonymous Power of exponent is to apply the gate multiple times and divide by 2pi to bring value of the angle from radians to degrees
Avatar
Anonymous 22-Jul-20 03:20 PM
@Anonymous Asthana I think you have corrected the typo ** to *; no question there but we do not work in degrees, we are trying to match definition of u1
💯 1
Avatar
Anonymous 22-Jul-20 03:20 PM
ok thanks for the help.
Avatar
Anonymous 22-Jul-20 03:22 PM
Have the Lecture Notes been posted for Lecture 3?
Avatar
Anonymous 22-Jul-20 03:23 PM
Yes
Avatar
Anonymous 22-Jul-20 03:23 PM
Have the Lecture Notes been posted for Lecture 3?
@Anonymous Fitter yes
👍 1
Avatar
Anonymous 22-Jul-20 03:23 PM
👍 1
Avatar
Anonymous 22-Jul-20 03:27 PM
Increasing the shots gave me an exact value...
(edited)
Avatar
Anonymous 22-Jul-20 03:30 PM
👍
Avatar
Anonymous 22-Jul-20 03:32 PM
Alright guys! So I am working on lab 2's diffuser function. It says to apply hadamard gate to all the qubits two times, but sand witch the phase_oracle in them with only 0
So I did something like:
Avatar
Anonymous 22-Jul-20 03:33 PM
you have to append the phase_oracle
Avatar
Anonymous 22-Jul-20 03:34 PM
for qubit in range(n): qc.h(qubit) phase_oracle(n,[0])
for qubit in range(n): qc.h(qubit)
Avatar
Anonymous 22-Jul-20 03:34 PM
qc.append(phase_oracle(n,[0]), range(n))
Avatar
Anonymous 22-Jul-20 03:34 PM
Hmm.... append the phase oracle or just index it @Anonymous Majboor
Avatar
Anonymous 22-Jul-20 03:35 PM
append to the circut
👍🏻 1
you dont have to do the range(n), you can do a forloop for phase oracle as well
Avatar
Anonymous 22-Jul-20 03:35 PM
@Anonymous Majboor I see what you saying
Avatar
Anonymous 22-Jul-20 03:40 PM
Thanks for the help. This community is very responsive and helpful:)
💯 2
👍 1
Avatar
Anonymous 22-Jul-20 03:40 PM
Why I am getting this error?
This is for lab2
Avatar
Anonymous 22-Jul-20 03:41 PM
Why I am getting this error?
@Anonymous are you using the recent grade files?
Avatar
Anonymous 22-Jul-20 03:42 PM
Do you mean I need to use grade.py file of lab3?
Avatar
Anonymous 22-Jul-20 03:42 PM
no. use the one linked above
Avatar
Anonymous 22-Jul-20 03:42 PM
@Anonymous Because I recently changed the grade.py that was given the same instructions channel
Avatar
Anonymous 22-Jul-20 03:43 PM
@Anonymous Because I recently changed the grade.py that was given the same instructions channel
@Anonymous if you replaced yesterday's grader with the one linked above and still not working, try this https://discordapp.com/channels/729706617951485954/735115703346266172/735574936948703273
Avatar
Anonymous 22-Jul-20 03:44 PM
One question. How do I set the target qubit?
I've applied the Hadamard gates o the measurement qubits
But I don't get how can you state which qubit is the target
Avatar
Anonymous 22-Jul-20 03:45 PM
One question. How do I set the target qubit?
@Anonymous which part of the code?
Avatar
Anonymous 22-Jul-20 03:46 PM
@Anonymous I'm sorry, I didn't understand your pointer, didn't see anything in that link
Avatar
Anonymous 22-Jul-20 03:46 PM
Since, you guys have already started working on lab assignments, please tell me should I watch "programming with qiskit" first or Can I directly jump to attempting lab, given that I have no prior experience in qiskit, but had understood the lecture well enough. (edited)
Avatar
Anonymous 22-Jul-20 03:46 PM
@Anonymous I'm sorry, I didn't understand your pointer, didn't see anything in that link
@Anonymous try this. this was suggested by the mentors. grade(..., force_commit=True)
it's just adding a force_commit=True to the very end of the grade function
leaving everything else intact
Avatar
Anonymous 22-Jul-20 03:48 PM
@Anonymous which part of the code?
@Anonymous In the third lab. The function name "initialize_qubits"
Avatar
Anonymous 22-Jul-20 03:48 PM
@Anonymous tried it, let's see what happens
Avatar
Anonymous 22-Jul-20 03:48 PM
@Anonymous In the third lab. The function name "initialize_qubits"
@Anonymous when a circuit is created, all qubits are by default |0> , setting the target to |1> should be enough with a simple X gate
Avatar
Anonymous 22-Jul-20 03:49 PM
@Anonymous Is it normal to take a lot of time? Because it's really slow
Avatar
Anonymous 22-Jul-20 03:49 PM
@Anonymous Is it normal to take a lot of time? Because it's really slow
@Anonymous transpiling takes time. if it fails this time too, try setting optimization_level=3 instead of the current 0. that worked for many
Avatar
Anonymous 22-Jul-20 03:50 PM
I'm at level 2 right now
Avatar
Anonymous 22-Jul-20 03:50 PM
I'm at level 2 right now
@Anonymous right. shouldn't be much of a difference then
Avatar
Anonymous 22-Jul-20 03:50 PM
@Anonymous when a circuit is created, all qubits are by default |0> , setting the target to |1> should be enough with a simple X gate
@Anonymous The x gate. I forgot it. Thanks 🙂
💯 1
Avatar
Anonymous 22-Jul-20 03:50 PM
I have tried many times but when I submit lab 2 solutions it always gives me the same error. Can some one help me on this?
Avatar
Anonymous 22-Jul-20 03:52 PM
Avatar
Anonymous 22-Jul-20 03:53 PM
yes
Avatar
Anonymous 22-Jul-20 03:53 PM
@Anonymous Again the same exact error
Avatar
Anonymous 22-Jul-20 03:53 PM
@Anonymous I have replaced the file. I can do it again.
Avatar
Anonymous 22-Jul-20 03:54 PM
@Anonymous Asthana Yes, don't forget to restart the kernel
Avatar
Anonymous 22-Jul-20 03:54 PM
@Anonymous Asthana Yes, don't forget to restart the kernel
@Anonymous @Anonymous try this one. 🙂
Avatar
Anonymous 22-Jul-20 03:54 PM
@Anonymous I tried with optimization level 3
@Anonymous meaning I need to restart the jupyter notebook?
Avatar
Anonymous 22-Jul-20 03:55 PM
Why does the algorithm count 10000 as 1, rather than 16, which I should get the correct answer 16/2^5 = 0.5 = theta? In https://qiskit.org/textbook/ch-algorithms/quantum-phase-estimation.html, 001 is counted as 1.
Avatar
Anonymous 22-Jul-20 03:55 PM
@Anonymous I tried with optimization level 3
@Anonymous yes it happens. keep retrying. restart kernel. delete cache before retrying. simply replacing grader file and not restarting the kernel won't do. try shifting the last grade line to a new cell.
Avatar
Anonymous 22-Jul-20 03:56 PM
@Anonymous deleting browser cache?
Avatar
Anonymous 22-Jul-20 03:57 PM
@Anonymous deleting browser cache?
@Anonymous no. in your directory, is there a cache/python cache. like this one in mine
inside the grading_tools folder
Avatar
Anonymous 22-Jul-20 03:57 PM
Got it and how do I restart the kernel?
Avatar
Anonymous 22-Jul-20 03:58 PM
Why does the algorithm count 10000 as 1, rather than 16, which I should get the correct answer 16/2^5 = 0.5 = theta? In https://qiskit.org/textbook/ch-algorithms/quantum-phase-estimation.html, 001 is counted as 1.
@Anonymous Kristiano my output was 00001. did you remember to swap before the main circuit of inverse QFT?
Avatar
Anonymous 22-Jul-20 03:58 PM
i am getting this error, which originates from the initialize function, and my code for the function is
def initialize_qubits(given_circuit, measurement_qubits, target_qubit): ### WRITE YOUR CODE BETWEEN THESE LINES - START #𝑈|𝜓⟩=𝑒2𝜋𝑖𝜃|𝜓⟩ given_circuit.initialize(measurement_qubits, target_qubit) ### WRITE YOUR CODE BETWEEN THESE LINES - END
(edited)
Avatar
Anonymous 22-Jul-20 03:59 PM
Got it and how do I restart the kernel?
@Anonymous at the top of the notebook, there a Kernel drop-down button. click it and see the options.
@Anonymous at the top of the notebook, there a Kernel drop-down button. click it and see the options.
@Anonymous or close the notebook and reload again. same thing.
Avatar
Anonymous 22-Jul-20 04:00 PM
@Anonymous ok seen. Thanks. I'll try that.
💯 1
Avatar
Anonymous 22-Jul-20 04:00 PM
i am getting this error, which originates from the initialize function, and my code for the function is
> @Anonymous Majboor you shouldn't be doing given_circuit.initialize(measurement_qubits, target_qubit) (edited)
that initializes the qubits to certain amplitudes, as we did in lab 1
here you need to have H on the first n-1 qubits and |1> on the last qubit
👍 2
Avatar
Anonymous 22-Jul-20 04:02 PM
@Anonymous Thank you so much buddy. I got right answer!
💯 1
👍 1
Avatar
Anonymous 22-Jul-20 04:04 PM
Guys i am getting the highest probability for the zero vector with 16 be the 2nd highest, what should i do?
Avatar
Anonymous 22-Jul-20 04:05 PM
Guys i am getting the highest probability for the zero vector with 16 be the 2nd highest, what should i do?
@Anonymous Singh check code.
😂 1
is your initialization fine? then move on to unitaries?
Avatar
Anonymous 22-Jul-20 04:05 PM
yeah i also keep getting the highest probability for the zero vector and I'm not quite sure where I've gone wrong
Avatar
Anonymous 22-Jul-20 04:06 PM
def initialize_qubits(given_circuit, measurement_qubits, target_qubit): ### WRITE YOUR CODE BETWEEN THESE LINES - START given_circuit.h(measurement_qubits) given_circuit.x(target_qubit)
This is my initialization function
Avatar
Anonymous 22-Jul-20 04:06 PM
@Anonymous Kristiano my output was 00001. did you remember to swap before the main circuit of inverse QFT?
@Anonymous I see, I need swap (again, so two times swap). My previous circuit is same (except numerical difference) as section 3.2 https://qiskit.org/textbook/ch-algorithms/quantum-phase-estimation.html. Here they consider 01010 in the picture as 10 (not like our lab problem which consider 00001 as 16).
Avatar
Anonymous 22-Jul-20 04:06 PM
@Anonymous Singh recheck. have you remembered to add 2*pi, because that's not by default in u1
Avatar
Anonymous 22-Jul-20 04:07 PM
i didnt swap the qubits and it worked
Avatar
Anonymous 22-Jul-20 04:07 PM
@Anonymous I see, I need swap (again, so two times swap). My previous circuit is same (except numerical difference) as section 3.2 https://qiskit.org/textbook/ch-algorithms/quantum-phase-estimation.html. Here they consider 01010 in the picture as 10 (not like our lab problem which consider 00001 as 16).
@Anonymous Kristiano yes 🙂
Avatar
Anonymous 22-Jul-20 04:07 PM
do i have to multiply or divide?
Avatar
Anonymous 22-Jul-20 04:07 PM
i didnt swap the qubits and it worked
@Anonymous interesting. i swapped and it worked
Avatar
Anonymous 22-Jul-20 04:07 PM
Bad convention 😦
Avatar
Anonymous 22-Jul-20 04:08 PM
Quizzes: URLs?: Will appreciate knowing the URL of Quizzes announced during yesterday's and today's lectures, and, any prior to that. Also, are these Quizzes optional or related to the Qiskit curriculum? Thank you.
Avatar
Anonymous 22-Jul-20 04:08 PM
@Anonymous maybe by serendipity it worked?🤷‍♀️ i’m looking forward to the answer sheet being released because im not too happy with my implementation
Avatar
Anonymous 22-Jul-20 04:08 PM
do i have to multiply or divide?
@Anonymous Singh yes. multiply 2*pi to theta before sending the parameter to cu1. Read the text cell just above or this screenshot
Avatar
Anonymous 22-Jul-20 04:08 PM
Why does the algorithm count 10000 as 1, rather than 16, which I should get the correct answer 16/2^5 = 0.5 = theta? In https://qiskit.org/textbook/ch-algorithms/quantum-phase-estimation.html, 001 is counted as 1.
@Anonymous Kristiano the answer is 00001
Avatar
Anonymous 22-Jul-20 04:09 PM
Why does the algorithm count 10000 as 1, rather than 16, which I should get the correct answer 16/2^5 = 0.5 = theta? In https://qiskit.org/textbook/ch-algorithms/quantum-phase-estimation.html, 001 is counted as 1.
@Anonymous Kristiano the order is reversed, i used the qiskit's iqft, it showed 00001 as output, actually the LSB is marked by q0, where as books like N&C uses MSB as q0/q1
💯 1
Avatar
Anonymous 22-Jul-20 04:09 PM
Quizzes: URLs?: Will appreciate knowing the URL of Quizzes announced during yesterday's and today's lectures, and, any prior to that. Also, are these Quizzes optional or related to the Qiskit curriculum? Thank you.
@Anonymous #feedback channel maybe would be better for this
Avatar
Anonymous 22-Jul-20 04:09 PM
@Anonymous #feedback channel maybe would be better for this
@Anonymous But good feedback!
Avatar
Anonymous 22-Jul-20 04:10 PM
@Anonymous Kristiano it's all about the order you are considering...
💯 1
Avatar
Anonymous 22-Jul-20 04:10 PM
@Anonymous But good feedback!
@Anonymous Diz yup. thought it would get lost here
Avatar
Anonymous 22-Jul-20 04:11 PM
here you need to have H on the first n-1 qubits and |1> on the last qubit
@Anonymous ah ok. thannk you
💯 1
Avatar
Anonymous 22-Jul-20 04:18 PM
method 2 😁
💯 1
Avatar
Anonymous 22-Jul-20 04:19 PM
QFT inv is nothing but QFT(-pi/2^n)
💯 1
Avatar
Anonymous 22-Jul-20 04:20 PM
I'm getting the right theta around half the time, but it also estimates a theta of 0.97 sometimes
Avatar
Anonymous 22-Jul-20 04:22 PM
how many cu gates should we expect?
Avatar
Anonymous 22-Jul-20 04:24 PM
how many cu gates should we expect?
@Anonymous depends. if you are using a looping approach to making U^(x), so should expect (n-1) + (n-2)....1 gates. if you are using the exponent as a multiplicative constant, you expect n-1 gates (edited)
Avatar
Anonymous 22-Jul-20 04:25 PM
@Anonymous depends. if you are using a looping approach to making U^(x), so should expect (n-1).(n-2)....1 gates. if you are using the exponent as a multiplicative constant, you expect n-1 gates
@Anonymous thanks!
Avatar
Anonymous 22-Jul-20 04:26 PM
@Anonymous thanks!
@Anonymous nope. scratch the earlier one. in the looping strategy you need (2^n-1) + (2^n-2)... (just the number of times U is repeated) (edited)
Avatar
Anonymous 22-Jul-20 04:26 PM
ah, okay, gotcha.
💯 1
I'd managed to do the angle**exponent instead of angle/exponent, which is why the U gates were completely wrong (one had an angle of 9000+)
😂 4
Avatar
Anonymous 22-Jul-20 04:28 PM
OVER 9000!
😆 4
Avatar
Anonymous 22-Jul-20 04:28 PM
and another was -pi/0
which sounds like a great angle
😂 2
Avatar
Anonymous 22-Jul-20 04:31 PM
I'd managed to do the angle**exponent instead of angle/exponent, which is why the U gates were completely wrong (one had an angle of 9000+)
@Anonymous you might need to check angle/exponent once if you are going ahead with that
Avatar
Anonymous 22-Jul-20 04:32 PM
@Anonymous you might need to check angle/exponent once if you are going ahead with that
@Anonymous I've already checked and submitted, but thanks
Avatar
Anonymous 22-Jul-20 04:32 PM
@Anonymous I've already checked and submitted, but thanks
@Anonymous cool then 🙂
Avatar
Anonymous 22-Jul-20 04:37 PM
@Anonymous You can use google collaborate. I've gotten everything to work in collaborate with some minor adjustments.
💯 1
Avatar
Anonymous 22-Jul-20 04:39 PM
I'm getting the right theta around half the time, but it also estimates a theta of 0.97 sometimes
I submitted, it said it was wrong. Then I submitted again without changing anything and it said it was right 😂
😂 3
Avatar
Anonymous 22-Jul-20 04:40 PM
what is the syntax for using the inverse qft using the QFT class?
👀 1
Avatar
Anonymous 22-Jul-20 04:40 PM
just use QFT( , ,inverse = True) (edited)
Avatar
Anonymous 22-Jul-20 04:41 PM
just use QFT( , ,inverse = true)
@Anonymous so it will be given_circuit.QFT( , ,inverse = true)?
Avatar
Anonymous 22-Jul-20 04:42 PM
you know how to use QTF class right. Then just use another attribute inverse= True
Avatar
Anonymous 22-Jul-20 04:42 PM
That's the thing. How do I use the class?
Avatar
Anonymous 22-Jul-20 04:43 PM
QFT(num_qubits, approximation_degree = m(where m<num_qubit), do_swaps=True, inverse=True) (edited)
Avatar
Anonymous 22-Jul-20 04:44 PM
@Anonymous is my graph correct ?
Im getting error
Avatar
Anonymous 22-Jul-20 04:44 PM
@Anonymous is my graph correct ?
@Anonymous nop
Avatar
Anonymous 22-Jul-20 04:44 PM
@Anonymous so it will be given_circuit.QFT( , ,inverse = true)?
@Anonymous given_circuit.QFT() is incorrect in the sense that you don't call a class QFT from an object given_circuit at least in the usual sense (there are exceptions though). other than that, @Anonymous has given the correct way: as an independent call to QFT
Avatar
Anonymous 22-Jul-20 04:45 PM
here is my unitary_matrice
@Anonymous
Avatar
Anonymous 22-Jul-20 04:47 PM
@Anonymous given_circuit.QFT() is incorrect in the sense that you don't call a class QFT from an object given_circuit at least in the usual sense (there are exceptions though).
>
other than that, @Anonymous has given the correct way: as an independent call to QFT
@Anonymous So how would I apply the QFT class to my circuit?
Avatar
Anonymous 22-Jul-20 04:47 PM
@Anonymous target qubit is a single integer denoting the qubit to operate on. you should not iterate on it
Avatar
Anonymous 22-Jul-20 04:48 PM
it seems I forgot 2*pi
Avatar
Anonymous 22-Jul-20 04:48 PM
@Anonymous So how would I apply the QFT class to my circuit?
@Anonymous you will have to use qc.append
Avatar
Anonymous 22-Jul-20 04:48 PM
it seems I forgot 2*pi
@Anonymous that too. and recheck the loop. you are applying cu1 target_qubit number of times.
Avatar
Anonymous 22-Jul-20 04:48 PM
QFT is a seperate circuit you cant write qc.QFT
👍 1
Avatar
Anonymous 22-Jul-20 04:49 PM
@Anonymous Ohh okay. Thanks!
💯 1
Avatar
Anonymous 22-Jul-20 04:53 PM
@Anonymous is ' given_circuit.cu1(thetaexponent/2pi,control_qubit,target_qubit)' alrigth ''
Avatar
Anonymous 22-Jul-20 04:53 PM
unitary_operator_exponent function will be given_circuit.cu1(2pitheta*exponent, control_qubit, target_qubit) ?
Avatar
Anonymous 22-Jul-20 04:54 PM
"yes"
Avatar
Anonymous 22-Jul-20 04:54 PM
>
unitary_operator_exponent function will be given_circuit.cu1(2pitheta*exponent, control_qubit, target_qubit) ? @Anonymous this one is correct
Avatar
Anonymous 22-Jul-20 04:57 PM
thanks
Avatar
Anonymous 22-Jul-20 04:57 PM
there is also " i ", so why aren't we multiplying " i " also along with 2 * pi * theta ?
Avatar
Anonymous 22-Jul-20 04:57 PM
there is also " i ", so why aren't we multiplying " i " also along with 2 * pi * theta ?
@Anonymous cu1 handles that
Avatar
Anonymous 22-Jul-20 04:58 PM
there is also " i ", so why aren't we multiplying " i " also along with 2 * pi * theta ?
@Anonymous no i comes in default with u
Avatar
Anonymous 22-Jul-20 04:58 PM
okk thanks, i got it now..
Avatar
Anonymous 22-Jul-20 04:58 PM
you just have to put the angle
Avatar
Anonymous 22-Jul-20 05:04 PM
what is difference between unitary operator and unitary_operator_esponent
is the same U
Avatar
Anonymous 22-Jul-20 05:05 PM
Do we need to iterate from
for control_qubit in range(target_qubit)
(edited)
Avatar
Anonymous 22-Jul-20 05:06 PM
@Anonymous target qubit is a single integer denoting the qubit to operate on. you should not iterate on it
@Anonymous Here?
Avatar
Anonymous 22-Jul-20 05:08 PM
Do we need to iterate from
for control_qubit in range(target_qubit)
@Anonymous target qubit is a single qubit , you dont have to iterate over
☑️ 1
Avatar
Anonymous 22-Jul-20 05:08 PM
gotcha, so no loop
Avatar
Anonymous 22-Jul-20 05:09 PM
Guys if you dont know it dosent matter which qubit is control and which one is target the cu1 will be same even if you switch them
Avatar
Anonymous 22-Jul-20 05:17 PM
Avatar
Anonymous 22-Jul-20 05:18 PM
dude listen
first write u1 matrix somewhere
then try finding u1^2 (edited)
Avatar
Anonymous 22-Jul-20 05:19 PM
what is ppi?
Avatar
Anonymous 22-Jul-20 05:19 PM
you will see t hat u1^2(thata) = u1(2*thata)
so you dont have to use itteration for that
just use exponent*theta insted
Avatar
Anonymous 22-Jul-20 05:20 PM
OK, @Anonymous
Avatar
Anonymous 22-Jul-20 05:20 PM
what is ppi?
@Anonymous Majboor dude i was getting -pi/-pi/4
and 0.2.25
Avatar
Anonymous 22-Jul-20 05:21 PM
I mean, i got theta measured as 0.5
Avatar
Anonymous 22-Jul-20 05:22 PM
hahahahah
whats 0.5.
Avatar
Anonymous 22-Jul-20 05:23 PM
theta is supposed to be 0.5
Avatar
Anonymous 22-Jul-20 05:23 PM
not quite 0.5 I assume
Avatar
Anonymous 22-Jul-20 05:23 PM
theta is supposed to be 0.5
@Anonymous Majboor yup
Avatar
Anonymous 22-Jul-20 05:23 PM
yep
Avatar
Anonymous 22-Jul-20 05:23 PM
did you submit it
Avatar
Anonymous 22-Jul-20 05:23 PM
no i am making sure everything else is right
the exponents are confusing me a little
Avatar
Anonymous 22-Jul-20 05:24 PM
just ask if you get stuck will be happy to help
Avatar
Anonymous 22-Jul-20 05:25 PM
👍 _
has anyone watched the videos multiple times? did it help you?
Avatar
Anonymous 22-Jul-20 05:26 PM
Well it should help i guess
Avatar
Anonymous 22-Jul-20 05:28 PM
@Anonymous for the final project, can we write a blog post? i have a specific idea in mind but im not sure if it needs approval
Avatar
Anonymous 22-Jul-20 05:33 PM
@Anonymous One question: the unitary_operator_exponent is defined as `given_circuit.cu1(2pitheta/exponent),control_qubit,target_qubit)' ?
Avatar
Anonymous 22-Jul-20 05:35 PM
yup
Avatar
Anonymous 22-Jul-20 05:36 PM
so I'm getting a measured_theta of 0.47
but my circuit is incorrect
is there something wrong with my QFT?
Avatar
Anonymous 22-Jul-20 05:36 PM
yup
@Anonymous Got it. I'm checking the part when you're explaining the inverse. I'll text you if I have any questions
Avatar
Anonymous 22-Jul-20 05:37 PM
is there something wrong with my QFT?
@Anonymous i cant even say that its QFT (edited)
Avatar
Anonymous 22-Jul-20 05:37 PM
Avatar
Anonymous 22-Jul-20 05:38 PM
@Anonymous https://qiskit.org/documentation/stubs/qiskit.circuit.library.QFT.html Check this and you will have an idea where you are wrong
Avatar
Anonymous 22-Jul-20 05:39 PM
@Anonymous Remember you have to do Inverse QFT
Avatar
Anonymous 22-Jul-20 05:44 PM
he can just put - pi/2^n
IQFT is same as QFT(-pi/2^i)
Avatar
Anonymous 22-Jul-20 05:46 PM
Yeah right just reminding him!!
Avatar
Anonymous 22-Jul-20 05:47 PM
i see
it looks like i probably used the wrong order of gates
given_circuit.h(measurement_qubits) given_circuit.x(target_qubit)
Avatar
Anonymous 22-Jul-20 05:55 PM
given_circuit.h(measurement_qubits) given_circuit.x(target_qubit)
@Anonymous this is correct
☑️ 1
Avatar
Anonymous 22-Jul-20 05:56 PM
I see. It looks like my values are reciprocated (edited)
getting
16pi 8pi 4pi 2pi pi
Avatar
Anonymous 22-Jul-20 05:57 PM
yup
Avatar
Anonymous 22-Jul-20 05:57 PM
instead of
pi/16 pi/8 pi/4 pi/2 pi
Avatar
Anonymous 22-Jul-20 05:58 PM
instead of
pi/16 pi/8 pi/4 pi/2 pi
@Anonymous yup you are totaly right
Avatar
Anonymous 22-Jul-20 05:58 PM
i must have something backwards
Avatar
Anonymous 22-Jul-20 05:58 PM
exponent * theta not theta / exponent
Avatar
Anonymous 22-Jul-20 05:59 PM
so in
def unitary_operator_exponent(given_circuit, control_qubit, target_qubit, theta, exponent): ### WRITE YOUR CODE BETWEEN THESE LINES - START given_circuit.cu1(2*pi*theta*exponent, control_qubit, target_qubit) ### WRITE YOUR CODE BETWEEN THESE LINES - END
this looks ok
Avatar
Anonymous 22-Jul-20 06:00 PM
is this is correct 'QFT(n , approximation_degree = n,inverse=True)'
👍 1
Avatar
Anonymous 22-Jul-20 06:00 PM
and for the iQFT:
def apply_iqft(given_circuit, measurement_qubits, n): ### WRITE YOUR CODE BETWEEN THESE LINES - START if n == 0: return given_circuit n -= 1 given_circuit.h(n) for measurement_qubits in range(n): given_circuit.cu1((-1)*pi/2**(n-measurement_qubits), measurement_qubits, n) ### WRITE YOUR CODE BETWEEN THESE LINES - END
I added the (-1) to the operator
Avatar
Anonymous 22-Jul-20 06:01 PM
is this is correct 'QFT(n , approximation_degree = n,inverse=True)'
@Anonymous yup its correct
and for the iQFT:
def apply_iqft(given_circuit, measurement_qubits, n): ### WRITE YOUR CODE BETWEEN THESE LINES - START if n == 0: return given_circuit n -= 1 given_circuit.h(n) for measurement_qubits in range(n): given_circuit.cu1((-1)*pi/2**(n-measurement_qubits), measurement_qubits, n) ### WRITE YOUR CODE BETWEEN THESE LINES - END
@Anonymous looks good to me
Avatar
Anonymous 22-Jul-20 06:03 PM
@Anonymous
QFT is not showing in the diagram
Avatar
Anonymous 22-Jul-20 06:04 PM
i dont think i need that extra Hgate
given_circuit.h(n)
(edited)
Avatar
Anonymous 22-Jul-20 06:04 PM
show me the codes
okay wait lets modify your codes for IQFT
why do you need n == 0
👍 1
remove that
Avatar
Anonymous 22-Jul-20 06:06 PM
Avatar
Anonymous 22-Jul-20 06:06 PM
you dont need pi*theta
just put thera
theta
Avatar
Anonymous 22-Jul-20 06:06 PM
QFT(n , approximation_degree = n,inverse=True)
ok
Avatar
Anonymous 22-Jul-20 06:07 PM
QFT(n , approximation_degree = n,inverse=True)
@Anonymous yup
Avatar
Anonymous 22-Jul-20 06:07 PM
i guess I dont need n==0 or n-=1
Avatar
Anonymous 22-Jul-20 06:07 PM
yes
you will be needing 2 loops for this
Avatar
Anonymous 22-Jul-20 06:08 PM
mine shows correct but does not show the others, is this submitted?
Avatar
Anonymous 22-Jul-20 06:08 PM
still qft don't show
Avatar
Anonymous 22-Jul-20 06:09 PM
still qft don't show
@Anonymous did you append it
qc.append(QFT(attributes you want), range(n))
Avatar
Anonymous 22-Jul-20 06:11 PM
given_circuit.append(QFT(n , approximation_degree = n,inverse=True)) but i got error
Avatar
Anonymous 22-Jul-20 06:11 PM
did you use range
\
you forgot to set the qubits it should be appended on
Avatar
Anonymous 22-Jul-20 06:13 PM
you forgot to set the qubits it should be appended on
@Anonymous to the qft?
Avatar
Anonymous 22-Jul-20 06:13 PM
yup
see the code i gave you
qc.append(QFT(attributes you want), range(n))
you forgot the range(n)
Avatar
Anonymous 22-Jul-20 06:14 PM
what would the 2nd loop be after the inverseQFT?
Avatar
Anonymous 22-Jul-20 06:14 PM
@Anonymous will send you a fig and you will understand
Avatar
Anonymous 22-Jul-20 06:16 PM
@Anonymous Big Thank
wonderful
Avatar
Anonymous 22-Jul-20 06:24 PM
what would the 2nd loop be after the inverseQFT?
@Anonymous This is IQFT circuit try making this
and sorry for this crappy work im not that good with drawing
Avatar
Anonymous 22-Jul-20 06:28 PM
thank you
It looks like i'm having issues with the first part of the circuit early on
the values are flipped
Avatar
Anonymous 22-Jul-20 06:29 PM
Is there any way to make sure that the labs submitted? I am a little paranoid.
Avatar
Anonymous 22-Jul-20 08:09 PM
This might be a trivial question, but why do all the QFT implementations always first perform in the reverse order and add SWAP gates in the end? Why can't we just directly implement it in the right order?
Avatar
Anonymous 22-Jul-20 08:10 PM
Can anyone help me out? Not sure exactly what I'm doing wrong but the measured phase is quite different from the 0.5 def initialize_qubits(given_circuit, measurement_qubits, target_qubit): given_circuit.h(measurement_qubits) given_circuit.x(target_qubit) return given_circuit return qc def unitary_operator(given_circuit, control_qubit, target_qubit, theta): given_circuit.cu1(theta*2*pi, control_qubit, target_qubit) return given_circuit def unitary_operator_exponent(given_circuit, control_qubit, target_qubit, theta, exponent): qc = given_circuit for _ in range(exponent): qc = unitary_operator(qc, control_qubit, target_qubit, theta) return qc def apply_iqft(given_circuit, measurement_qubits, n): gate = QFT(num_qubits=n, approximation_degree=n, do_swaps=False, inverse=True, insert_barriers=False, name='iqft') given_circuit.append(gate, measurement_qubits)
Avatar
Anonymous 22-Jul-20 08:21 PM
@Anonymous Changing do_swaps = True should work
👍 3
Avatar
Anonymous 22-Jul-20 08:22 PM
I used in the unitary_operator exponent: unitary_operator(given_circuit, control_qubit, target_qubit, theta*exponent)
Avatar
Anonymous 22-Jul-20 08:23 PM
@Anonymous thank you!
😃 1
Avatar
Anonymous 22-Jul-20 08:26 PM
Is there any way to make sure that the labs submitted? I am a little paranoid.
@Anonymous Majboor If you saw message like this, you should be fine:
Avatar
Anonymous 22-Jul-20 08:35 PM
@Anonymous Thanks, got it to work!
Avatar
Anonymous 22-Jul-20 08:55 PM
@Anonymous I didnt get the bottom part that said "Correct answers: lab1, lab2, etc"
This is how mine looks
is this a problem @Anonymous ?
Avatar
Anonymous 22-Jul-20 09:00 PM
This is how mine looks
@Anonymous Majboor grade(..., force_commit=True) try adding this parameter
Avatar
Anonymous 22-Jul-20 09:01 PM
👍 thank you!
Avatar
Anonymous 22-Jul-20 09:09 PM
hey guys
can phase kickback be seen as a way to apply the effect of a controlled operation in reverse fashion?
Avatar
Anonymous 22-Jul-20 10:03 PM
hey guy, do i need to 'return given_circuit' in every function?
Avatar
Anonymous 22-Jul-20 10:15 PM
hey guy, do i need to 'return given_circuit' in every function?
@Anonymous nope, you don't need to 🙂
💯 1
Avatar
Anonymous 22-Jul-20 10:16 PM
@Anonymous nope, you don't need to 🙂
@Anonymous thank you 🙂
👍 1
Avatar
Anonymous 22-Jul-20 10:29 PM
Could someone tell me what's wrong with given_circuit.cu1(theta * 2 * pi, control_qubit, target_qubit)? I'm getting the error "'NoneType' object has no attribute 'cu1'" (edited)
Avatar
Anonymous 22-Jul-20 10:33 PM
Could someone tell me what's wrong with given_circuit.cu1(theta * 2 * pi, control_qubit, target_qubit)? I'm getting the error "'NoneType' object has no attribute 'cu1'"
@Anonymous can you send an image of the error??
Avatar
Anonymous 22-Jul-20 10:33 PM
@Anonymous
Avatar
Anonymous 22-Jul-20 10:34 PM
In which cell is this occurring, send the picture of the cell please
Avatar
Anonymous 22-Jul-20 10:35 PM
It's the cell they provide for running qpe. You can see my code in the error message.
Avatar
Anonymous 22-Jul-20 10:37 PM
The most probable reason I guess is that your given_circuit variable has not been initialized as qc.QuantumCircuit(......)
So it's still not a QuantumCircuit object, but python is telling that it's a Nonetype object
Avatar
Anonymous 22-Jul-20 10:39 PM
But given_circuit is provided, why would it not be the correct type?
Avatar
Anonymous 22-Jul-20 10:41 PM
Ohh I get it
Don't run for loop to do the exponent thing, just change the angle from theta to theta**exponent
Avatar
Anonymous 22-Jul-20 10:43 PM
That fixed it, thank you
Avatar
Anonymous 22-Jul-20 10:44 PM
Sure thing 😊
Avatar
Anonymous 22-Jul-20 10:45 PM
hmmmm got a measured theta of 0.5
Avatar
Anonymous 22-Jul-20 10:51 PM
@Anonymous Majboor please rerun it
Avatar
Anonymous 22-Jul-20 10:51 PM
It worked earlier.
Avatar
Anonymous 22-Jul-20 10:51 PM
Huge thanks to the @Anonymous and admins for seamless lab experience this time in lab3 without any major glitches
Avatar
Anonymous 22-Jul-20 10:52 PM
Nice -- did you like implementing phase estimation?
Avatar
Anonymous 22-Jul-20 10:52 PM
@Anonymous
👍 1
Avatar
Anonymous 22-Jul-20 10:52 PM
It's really cool to see the answer come out cleanly when it works
👍 2
Avatar
Anonymous 22-Jul-20 10:52 PM
Yes, and not get 9999 for theta lol
😆 1
Avatar
Anonymous 22-Jul-20 10:53 PM
@Anonymous Asfaw I need help with my assignment
Avatar
Anonymous 22-Jul-20 10:53 PM
@Anonymous Asfaw yes sir, both loved the way you taught us and the way lab3 was implemented without having any glitches, like the server issue last time 😊 (edited)
qiskitsmart 2
Avatar
Anonymous 22-Jul-20 10:55 PM
When we apply Z gate, Rz gate we obtain relative phase of a qubit. QPE provides Global Phase measurement . Have I interpreted correct? @Anonymous Asfaw (edited)
Avatar
Anonymous 22-Jul-20 10:57 PM
Yeah you got it. The Z gate for example puts a phase of -1 (or exp(i*pi)) on the eigenstate |1>, and QPE can help you capture that phase
👍 1
Avatar
Anonymous 22-Jul-20 11:02 PM
Yeah you got it. The Z gate for example puts a phase of -1 (or exp(i*pi)) on the eigenstate |1>, and QPE can help you capture that phase
@Anonymous Asfaw Ohhh. I had a lot of confusion related with Z and Rz gate. Thanks to @Anonymous Schmitt and @Anonymous for discussion. Can I conclude this way in the diagram state| 1> gives me phase which i can obtain using QPE in quantum , or convert complex number of |1> state into polar using classical numpy package ?
Avatar
Anonymous 22-Jul-20 11:04 PM
Ah, you have to be careful there. We're talking about phases coming from unitaries onto their eigenstates
in your example, you started with the state |0> + |1> before the Rz gate, and that state is not an eigenstate of Rz. The eigenstates of Rz are |0> and |1>
Avatar
Anonymous 22-Jul-20 11:08 PM
in your example, you started with the state |0> + |1> before the Rz gate, and that state is not an eigenstate of Rz. The eigenstates of Rz are |0> and |1>
@Anonymous Asfaw Oh Ok. That's information i missed about. In the same example if don't include the H gate then i obtain [1 +0.j , 0 + 0.j]. Please if you can give inputs so that i can understand.
Avatar
Anonymous 22-Jul-20 11:10 PM
The key thing to remember is that in order to do QPE, you need to be able to apply the unitary U, and you need to be able to generate an eigenstate of U
👍 1
your code above is just fine -- just you can't use Rz and |0> + |1> to do QPE
Avatar
Anonymous 22-Jul-20 11:15 PM
your code above is just fine -- just you can't use Rz and |0> + |1> to do QPE
@Anonymous Asfaw Thank you so much. Need to study more basics of gates and their matrix.
Avatar
Anonymous 22-Jul-20 11:17 PM
@Anonymous I think this is a neat cheatsheet
It was indeed very challenging for me as a beginner to remember the matrix representation of the single-qubit and multi-qubit…
👍 4
Avatar
Anonymous 22-Jul-20 11:21 PM
How can I insert the QFT function into my circuit?
Avatar
Anonymous 22-Jul-20 11:24 PM
@Anonymous Asfaw Are there any resources you could recommend for helping develop an "intuition" about quantum concepts? I feel like in the labs I'm basically just following the instructions to apply certain gates in certain orders, but I can't explain why I'm doing these steps. (edited)
Avatar
Anonymous 22-Jul-20 11:24 PM
It was indeed very challenging for me as a beginner to remember the matrix representation of the single-qubit and multi-qubit…
@Anonymous Asfaw Are there any resources you could recommend for helping develop an "intuition" about quantum concepts? I feel like in the labs I'm basically just following the instructions to apply certain gates in certain orders, but I can't explain why I'm doing these steps.
@Anonymous Agree, I think we all need to understand the quantum gates and their implementation in different algorithms.
Avatar
Anonymous 22-Jul-20 11:26 PM
I get -pi/0 on the 5_th and the 6_th qubits and after that it blows up, (here with n = 7). Why would that be?
Avatar
Anonymous 22-Jul-20 11:28 PM
I get -pi/0 on the 5_th and the 6_th qubits and after that it blows up, (here with n = 7). Why would that be?
@Anonymous Hi -- can you share your code notebook via direct message?
Avatar
Anonymous 22-Jul-20 11:31 PM
your code above is just fine -- just you can't use Rz and |0> + |1> to do QPE
@Anonymous Asfaw Actually, I am not using Z and RZ for QPE. I was trying to understand what happens when you apply them on a single qubit and what we obtain in the statevector . (edited)
Avatar
Anonymous 22-Jul-20 11:43 PM
@Anonymous Asfaw One last query : Are R(phi) and Rz gate same then matrix representation is different ? (edited)
Avatar
Anonymous 22-Jul-20 11:44 PM
For the inverse QFT, is it expected that we use the QFT function we import, or do we write from scratch? I recall that the QFT ordering in qiskit is slightly different from that of lecture?
Avatar
Anonymous 22-Jul-20 11:45 PM
@Anonymous I think the idea is the same, but the implementation is slightly different.
Are controlled conditions like .c_if(clasical bit, value) initializing a quantum bit to the value of the classical bit and then entangling that qubit to the quantum qubit corresponding to the classical bit?
Avatar
Anonymous 22-Jul-20 11:48 PM
@Anonymous I think the idea is the same, but the implementation is slightly different.
@Anonymous Ok. Actually got confused with both matrix representation . Thanks
Avatar
Anonymous 22-Jul-20 11:49 PM
Just realized that i was getting the wrong answer because I was inputting an additional i into the cu1 gate, when it already includes an i in the exponent... facepalm
Avatar
Anonymous 22-Jul-20 11:50 PM
@Anonymous you can import it from the qiskit library or you can make it yourself using gates. If you do it in the ordering of the lecture it should work as well
👍 1
Avatar
Anonymous 22-Jul-20 11:53 PM
@Anonymous you can import it from the qiskit library or you can make it yourself using gates. If you do it in the ordering of the lecture it should work as well
@Anonymous for the built in qft qiskit function how can I insert it into the circuit
Avatar
Anonymous 22-Jul-20 11:56 PM
@Anonymous Atallah I used append to append the QFT into my circuit
👍 1
Avatar
Anonymous 23-Jul-20 12:00 AM
@Anonymous Asfaw One last query : Are R(phi) and Rz gate same then matrix representation is different ?
@Anonymous I got it. There are different represenations
Avatar
Anonymous 23-Jul-20 12:01 AM
@Anonymous Can you please elaborate?
Avatar
Anonymous 23-Jul-20 12:01 AM
Oh I think I just figured it out 😂 was overthinking
👍 1
Avatar
Anonymous 23-Jul-20 12:27 AM
@Anonymous More generally, if you are only talking about single-qubit gates, then global phases don’t matter, so both are the same gate; if you add control to them (not classical control), then global phases do matter because the global phase for single qubit becomes the relative phase for two qubit.
Avatar
Anonymous 23-Jul-20 12:36 AM
How do you call the QFT module for the measurement qubit list?
Avatar
Anonymous 23-Jul-20 12:40 AM
How do you call the QFT module for the measurement qubit list?
@Anonymous It would be something like mycircuit.append(QFT(4), [0,1,2,3]) where 4 is the number of qubits and [0,1,2,4] are the indices. If you want the inverse QFT then you can add reverse=True within the QFT constructor.
Avatar
Anonymous 23-Jul-20 12:40 AM
Ohh so the list is a parameter for append. Thanks!
Avatar
Anonymous 23-Jul-20 12:42 AM
Ohh so the list is a parameter for append. Thanks!
@Anonymous Check yesterday's lab, where you had to append the phase oracle. This is exactly the same process.
Avatar
Anonymous 23-Jul-20 01:13 AM
In the initialization, do we have to apply the U1 to the target QBit?
Also they want us to accommodate that factor of 2pi in the exp, so how do we go about that?
Avatar
Anonymous 23-Jul-20 01:23 AM
@Anonymous More generally, if you are only talking about single-qubit gates, then global phases don’t matter, so both are the same gate; if you add control to them (not classical control), then global phases do matter because the global phase for single qubit becomes the relative phase for two qubit.
@Anonymous Thanks. But, If i just apply a single qubit gate i.e Rz then in that case relative phase is in |1>state.
Avatar
Anonymous 23-Jul-20 01:27 AM
How do we implement the controlled U gate?
Avatar
Anonymous 23-Jul-20 01:29 AM
circuit.cu1(phase, control, target)
Avatar
Anonymous 23-Jul-20 01:41 AM
Also they want us to accommodate that factor of 2pi in the exp, so how do we go about that?
@Anonymous Fitter If you compare the expression for the U gate with Qiskit's u1 gate, you can see that if you replace theta by 2 * pi * theta in the expression for u1 gate will give you the U gate.
Avatar
Anonymous 23-Jul-20 01:43 AM
In the definition of the u1 gate, we have a factor of xj in the exponent, which the the target qubit. However, when we apply controlled u1 gate during QPE, instead of the target qubit, the exponent has a factor of the control qubit. Why is this?
Avatar
Anonymous 23-Jul-20 01:48 AM
The control input isn’t restricted to |0> or |1>. When it has some other value a|0> + b|1>, the result is a linear combination of the identity and u1 operations applied to the target qubit: a|0>|x_j> + b|1>U|x_j>. I’m not sure if that answers your question, but hope it helps
Avatar
Anonymous 23-Jul-20 01:50 AM
In the initialization part, do we need to apply U1 to the target qbit?
Avatar
Anonymous 23-Jul-20 01:50 AM
The control input isn’t restricted to |0> or |1>. When it has some other value a|0> + b|1>, the result is a linear combination of the identity and u1 operations applied to the target qubit: a|0>|x_j> + b|1>U|x_j>. I’m not sure if that answers your question, but hope it helps
@Anonymous I'm sorry I couldn't really understand. Could you please clarify?
Avatar
Anonymous 23-Jul-20 01:52 AM
For a controlled gate CU with control |x> and target |y>: if x is 0 then CU|xy> is |xy>, if x is 1 then CU|xy> is U|xy>, but if x is something else then it'll affect the result differently
I haven't actually gotten to QPE yet so I can't fully answer your question
Avatar
Anonymous 23-Jul-20 01:55 AM
Oh okay. Thank you! @Anonymous
Avatar
Anonymous 23-Jul-20 01:59 AM
also, the control qubit can be affected in a way: swapping the control and target in a CZ gate gives the same result, and putting Hadamard gates before and after a CNOT gate effectively swaps which qubit is the control and which is the target
Controlled quantum gates can deviate from classical expectations of controlled operations
Avatar
Anonymous 23-Jul-20 02:03 AM
In lab3 who do you implement unitary operation ?? I am not getting it need help can someone explain me ??
Avatar
Anonymous 23-Jul-20 02:04 AM
In the Exponentiated U, why is theta**exponent not giving the correct result but a for loop works?
Avatar
Anonymous 23-Jul-20 02:13 AM
Keep in mind that e^a * e^b = e^(a+b) and (e^a)^b = e^(ab)
👍 1
Avatar
Anonymous 23-Jul-20 02:48 AM
Yesterday Abe said that in the circuit the UROT matrix gets the input from the line they are connected to.. Then How was the UROT connected to the second cubit taking input from line 3 get the input as 2?
I mean the rightmost /bottommost UROT
*qubit> Yesterday Abe said that in the circuit the UROT matrix gets the input from the line they are connected to.. Then How was the UROT connected to the second cubit taking input from line 3 get the input as 2? @Anonymous *qubit
Avatar
Anonymous 23-Jul-20 02:53 AM
@Anonymous are you asking for subscript 2?
Avatar
Anonymous 23-Jul-20 02:53 AM
Yes.
I had been thinking its connected to the input qubit number.
Avatar
Anonymous 23-Jul-20 02:54 AM
He took Hadamard as Urot1
👍 1
Avatar
Anonymous 23-Jul-20 02:54 AM
@Anonymous Fitter oh I see.. Thanks
Avatar
Anonymous 23-Jul-20 02:55 AM
Actually in qiskit you may have to run a loop from 1 to range(n+1) instead of range(n) which is 0 to n-1
@Anonymous
Avatar
Anonymous 23-Jul-20 02:59 AM
Oh yes. Right
Avatar
Anonymous 23-Jul-20 03:04 AM
Python's range() includes the start and excludes the end: range(end) = range(start, end)[start, start + 1, start + 2, ..., end - 1]
👍 1
Avatar
Anonymous BOT 23-Jul-20 03:17 AM
Your hand has been raised! A mentor will drop in as soon as they are available.
Avatar
Anonymous 23-Jul-20 03:26 AM
hi community ! I am uploading the SS of my code and errors pls guide me
Avatar
Anonymous 23-Jul-20 03:33 AM
@Anonymous Miqdad Khan the error is at line 6 inside ur unitary_operator_exponent(), where u've mentioned experiment instead of exponent
Avatar
Anonymous 23-Jul-20 03:36 AM
i change it but getting new error now
NameError: name 'given_crcuit' is not defined
and this AttributeError: 'QuantumCircuit' object has no attribute 'cul'
Avatar
Anonymous 23-Jul-20 03:37 AM
Did you write given_crcuit instead of given_circuit?
Also, what line is causing the AttributeError?
Avatar
Anonymous 23-Jul-20 03:38 AM
sending the error image
Avatar
Anonymous 23-Jul-20 03:38 AM
Avatar
Anonymous 23-Jul-20 03:38 AM
Avatar
Anonymous 23-Jul-20 03:40 AM
@Anonymous @Anonymous Fitter ( wrt to the image from yesterdays notes) : will the last quit xn have only 1 H and 1 UROT? Right?
Avatar
Anonymous 23-Jul-20 03:41 AM
@Anonymous Miqdad Khan the gate's name is cu1 and not cul, which one did you write?
👆 1
Avatar
Anonymous 23-Jul-20 03:43 AM
@Anonymous Miqdad Khan There is no need to return the circuit
and given_circuit..check the spelling..
Avatar
Anonymous 23-Jul-20 03:46 AM
AttributeError: 'NoneType' object has no attribute 'cu1' i correct it to cu1
TypeError: init() got an unexpected keyword argument 'do_swap'
@Anonymous Miqdad Khan There is no need to return the circuit
@Anonymous corrected the spelling and which return i should remove ? all ?
Avatar
Anonymous 23-Jul-20 03:50 AM
all the returns, the circuit object is passed by reference no need to return any thing from the functions....
@Anonymous Miqdad Khan
Avatar
Anonymous 23-Jul-20 03:55 AM
there was no need to remove return statements the problem was with the unexpected argument of "do_swap" so just remove it and it works
👍 4
thanks to everyone for helping me out
Avatar
Anonymous 23-Jul-20 04:19 AM
>
there was no need to remove return statements the problem was with the unexpected argument of "do_swap" so just remove it and it works @Anonymous Miqdad Khan great you did it
Avatar
Anonymous 23-Jul-20 04:19 AM
Thanks @Anonymous
Avatar
Anonymous 23-Jul-20 04:41 AM
Can anybody help me with the error?
Don't required done...
Avatar
Anonymous 23-Jul-20 04:44 AM
Can anybody help me with the error?
@Anonymous Just remove everything before the = sign and the = sign itself It'll work.
Avatar
Anonymous 23-Jul-20 04:48 AM
Yaaah
Avatar
Anonymous 23-Jul-20 04:50 AM
okay @Anonymous listen
in this exponent part
its asking you to apply U exponent times
if you do U(theta)^2 with matrix mutiplication you can see that U(theta)^2 = U(2*theta)
use that to make a one line code for that section
and don't forget to use 2*pi for U
Avatar
Anonymous 23-Jul-20 05:01 AM
Yaah I have noticed that and removed it previously
👍
Avatar
Anonymous 23-Jul-20 05:03 AM
good
so you completed it
Avatar
Anonymous 23-Jul-20 05:09 AM
No... currently stuck with the iqft part
Avatar
Anonymous 23-Jul-20 05:10 AM
remember
IQFT = QFT(-pi/2^n)
this will help you a lot
Avatar
Anonymous 23-Jul-20 05:13 AM
QFT(..., inverse=True) also gives you an inverse QFT
Avatar
Anonymous 23-Jul-20 05:13 AM
Ok....they have given some inbuilt function .....
Avatar
Anonymous 23-Jul-20 05:13 AM
IQFT = QFT(-pi/2^n)
@Anonymous Didn't understand this. Is it QFT of -pi/2^n? If yes then where are we giving the input x~??
Avatar
Anonymous 23-Jul-20 05:13 AM
Hi All, just had a glance on the unitary_exponent function in lab 3 , i noticed that few are calling the unitary_operator function inside the unitary_exponent function. I didn't get the logic @Anonymous Miqdad Khan (edited)
Avatar
Anonymous 23-Jul-20 05:15 AM
@Anonymous because we have to make (control U)^2^n ...so to make you have to call the function....
Avatar
Anonymous 23-Jul-20 05:16 AM
@Anonymous Didn't understand this. Is it QFT of -pi/2^n? If yes then where are we giving the input x~??
@Anonymous Fitter QFT takes its cu1(theta) where theta is in [pi/2,pi/4,...,pi/2^i,...] right but if you just put a - sign in that set [-pi/2,-pi/4,.....,-pi/2^i,...] then it will be a IQFT (edited)
Avatar
Anonymous 23-Jul-20 05:17 AM
If you multiply n number of U1 matrices then you will get the same matrix that is for U^2^n
Avatar
Anonymous 23-Jul-20 05:17 AM
Hi All, just had a glance on the unitary_exponent function in lab 3 , i noticed that few are calling the unitary_operator function inside the unitary_exponent function. I didn't get the logic @Anonymous Miqdad Khan
@Anonymous you can just use a cu1 gate as well its not big of a deal
Avatar
Anonymous 23-Jul-20 05:17 AM
@Anonymous you can just use a cu1 gate as well its not big of a deal
@Anonymous Hey thats what i was thinking because i just simply used cu1.
Avatar
Anonymous 23-Jul-20 05:19 AM
@Anonymous Fitter QFT takes its cu1(theta) where theta is in [pi/2,pi/4,...,pi/2^i,...] right but if you just put a - sign in that set [-pi/2,-pi/4,.....,-pi/2^i,...] then it will be a IQFT
@Anonymous So how do I do that in qiskit? I mean I cant pass the negative to the built in QFT function right?
Avatar
Anonymous 23-Jul-20 05:19 AM
for build in QFT you have an attributtefir that inverse = True or False
the thing i was talking about was for those who want to design the circuit themself
👍 1
Avatar
Anonymous 23-Jul-20 05:20 AM
@Anonymous yes ..if you can multiply n number of cu1 gate's matrices you will get the same as U^(2^n)
Avatar
Anonymous 23-Jul-20 05:21 AM
I just found out that you can also call .inverse() (edited)
👍 1
Avatar
Anonymous 23-Jul-20 05:21 AM
@Anonymous Hey thats what i was thinking because i just simply used cu1.
@Anonymous if you see the unitary_operator is nothing but only a cu1 i dont know wht even use it
Avatar
Anonymous 23-Jul-20 05:21 AM
In Italy we finish the live lecture at 7pm, it's funny to see that my labs after that are always wrong, the day after (now 11am) I corrected my algo in 10 minutes and it works hahaha
Avatar
Anonymous 23-Jul-20 05:21 AM
i just left it alone in peace and used cu1 everwhere
In Italy we finish the live lecture at 7pm, it's funny to see that my labs after that are always wrong, the day after (now 11am) I corrected my algo in 10 minutes and it works hahaha
@Anonymous some spooky thing must be going on with your timezone my friend
Avatar
Anonymous 23-Jul-20 05:23 AM
I obtain error, please guide me
Avatar
Anonymous 23-Jul-20 05:25 AM
@Anonymous if you see the unitary_operator is nothing but only a cu1 i dont know wht even use it
@Anonymous It's like we need to call unitary operator function inside unitary_exponent function. Otherwise if we use cu1 then unitary operator function is not required.
I obtain error, please guide me
@Anonymous Haodudin Nurkifli In IQFT i dont think do_swap is required
Avatar
Anonymous 23-Jul-20 05:25 AM
@Anonymous It's like we need to call unitary operator function inside unitary_exponent function. Otherwise if we use cu1 then unitary operator function is not required.
@Anonymous you are totally correct
@Anonymous Haodudin Nurkifli In IQFT i dont think do_swap is required
@Anonymous ya its required
you have to swap
Avatar
Anonymous 23-Jul-20 05:26 AM
In Italy we finish the live lecture at 7pm, it's funny to see that my labs after that are always wrong, the day after (now 11am) I corrected my algo in 10 minutes and it works hahaha
@Anonymous Yea thats cos your mind is tired by the end of the lecture and the end of the day. Even in my time, the lecture gets over at 21:30 and I tried doing the first lab and it took me 3h. But when I did the labs the next day, it hardly took 15m for lab 2 and same for 3
Avatar
Anonymous 23-Jul-20 05:28 AM
@Anonymous Haodudin Nurkifli firstly you dont need to myliply 2pi to theta in unitary opaator remove that
Avatar
Anonymous 23-Jul-20 05:28 AM
@Anonymous Haodudin Nurkifli You should be calling unitary_operator instead of unitary_operator_exponent inside of unitary_operator_exponent
Avatar
Anonymous 23-Jul-20 05:29 AM
exactly you are callung for the function itself
Avatar
Anonymous 23-Jul-20 05:30 AM
Avatar
Anonymous 23-Jul-20 05:30 AM
@Anonymous But when i used do_swap it gives error
Avatar
Anonymous 23-Jul-20 05:31 AM
@Anonymous Thanks
👍 1
@Anonymous Thanks
Avatar
Anonymous 23-Jul-20 05:31 AM
@Anonymous Haodudin Nurkifli and try one thing find whats U(theta)^2 using matrix multi
you will see thats its U(2*theta)
so you dont have to use for loop for doning the U^exponent
Avatar
Anonymous 23-Jul-20 05:32 AM
@Anonymous But when i used do_swap it gives error
@Anonymous Oh i had used wrong it shouls be do_swaps
Avatar
Anonymous 23-Jul-20 05:32 AM
you could use U^exponent = U(exponent*theta)
Avatar
Anonymous 23-Jul-20 05:33 AM
@Anonymous is proposing a mathematical simplification, you can take it or leave it
Avatar
Anonymous 23-Jul-20 05:33 AM
@Anonymous Oh i had used wrong it shouls be do_swaps
@Anonymous i guess the swap is true by default if you dont mention it in attribute
Avatar
Anonymous 23-Jul-20 05:33 AM
Yes
That's how they've defined it
Avatar
Anonymous 23-Jul-20 05:36 AM
@Anonymous i guess the swap is true by default if you dont mention it in attribute
@Anonymous Hey its default swap true in QFT (edited)
@Anonymous If you see the circuit is 2^4 pi, 2^3pi, 2^2 pi ,2^1 pi ,2^0 pi in the circuit i mean cu1 gates correct?
you could use U^exponent = U(exponent*theta)
@Anonymous with respect to unitary_operator function
Avatar
Anonymous 23-Jul-20 05:39 AM
Hi All, just had a glance on the unitary_exponent function in lab 3 , i noticed that few are calling the unitary_operator function inside the unitary_exponent function. I didn't get the logic @Anonymous Miqdad Khan
@Anonymous I just saw your msg, sorry for being late. I see that the community members have answered you well! That's the beauty of this community!
👍 2
Avatar
Anonymous 23-Jul-20 05:41 AM
@Anonymous If you see the circuit is 2^4 pi, 2^3pi, 2^2 pi ,2^1 pi ,2^0 pi in the circuit i mean cu1 gates correct?
@Anonymous yes
@Anonymous with respect to unitary_operator function
@Anonymous yes
if you see the unitary oparater exponent is itself a cu1 with different set of theta
Avatar
Anonymous 23-Jul-20 05:49 AM
My lab1 soln which was submitted for grading is not visible in the records. Can anyone help?
Avatar
Anonymous 23-Jul-20 05:51 AM
no idea
tag any of the mentors and ask whats t he prob (edited)
Avatar
Anonymous 23-Jul-20 05:52 AM
My lab1 soln which was submitted for grading is not visible in the records. Can anyone help?
@Anonymous @Anonymous
Avatar
Anonymous 23-Jul-20 05:56 AM
I don't know how to do this part correctly
given_circuit.draw()
Avatar
Anonymous 23-Jul-20 05:58 AM
I don't know how to do this part correctly
@Anonymous if you check QFT arg it has one inverse=True. Also in the append second arg is missing (edited)
Avatar
Anonymous 23-Jul-20 05:58 AM
You're so right
Avatar
Anonymous 23-Jul-20 05:58 AM
I don't know how to do this part correctly
@Anonymous every thing looks great just put range(n) (edited)
in the append attribute
Avatar
Anonymous 23-Jul-20 05:59 AM
I'm gonna try, thank you guys
Avatar
Anonymous 23-Jul-20 05:59 AM
@Anonymous every thing looks great just put range(n)
@Anonymous I think it has to be append on the measurement qubits
Avatar
Anonymous 23-Jul-20 06:00 AM
It gives an error whenever I put range(measurement_qubits)
I'm not really sure on how to append it to the measurement qubits
Avatar
Anonymous 23-Jul-20 06:00 AM
It gives an error whenever I put range(measurement_qubits)
@Anonymous not range. measurement_qubits itself is a list if you check the main program (edited)
@Anonymous not range. measurement_qubits itself is a list if you check the main program
@Anonymous so range is not required
Avatar
Anonymous 23-Jul-20 06:01 AM
Ohhh I see
I got this result, is that correct?
I assume it is
Avatar
Anonymous 23-Jul-20 06:02 AM
Ohhh I see
@Anonymous Hey already answer is given 0.5👍.Did you submit (edited)
Avatar
Anonymous 23-Jul-20 06:02 AM
I have to
Thank you for the help guys
Avatar
Anonymous 23-Jul-20 06:03 AM
This is about the lab on Grover's algorithm Why did we use numpy to generate a 2^n x 2^n matrix instead of applying gates like done in qiskit textbook? Is it to make it easier for generalizing because I think using a numpy array of exponential sizes would be impractical in the longer run? (edited)
Avatar
Anonymous 23-Jul-20 06:03 AM
@Anonymous I think it has to be append on the measurement qubits
@Anonymous yup but in our case its the top most n-1 qubits so why not use range(n)
This is about the lab on Grover's algorithm
>
Why did we use numpy to generate a 2^n x 2^n matrix instead of applying gates like done in qiskit textbook? Is it to make it easier for generalizing because I think using a numpy array of exponential sizes would be impractical in the longer run?
@Anonymous Garg because its easier this way. if we know what matrix is then its just easy to use the matrix itself.
and about the longer run. it will be just fine its just a diagonal matrix with every element mod equals 1
Avatar
Anonymous 23-Jul-20 06:06 AM
Because we can just put the number we want to find, that's why right? And using gates would be more efficient (space-complexity) but we'd need to find the right sequence of gates for every set of value we need to run?
Avatar
Anonymous 23-Jul-20 06:06 AM
its an easy task for the compiler to so that
Because we can just put the number we want to find, that's why right? And using gates would be more efficient (space-complexity) but we'd need to find the right sequence of gates for every set of value we need to run?
@Anonymous Garg yup you are totaly correct
Avatar
Anonymous 23-Jul-20 06:07 AM
Alright. Thanks mate.
Avatar
Anonymous 23-Jul-20 06:08 AM
plus writing loops for gate placement is to much work if you just can use matrix
Alright. Thanks mate.
@Anonymous Garg no problem
Avatar
Anonymous 23-Jul-20 06:22 AM
Question : isn't inverse QFT same as QFT with the phases multiplied by -1 ?
👍 1
Avatar
Anonymous 23-Jul-20 06:29 AM
@Anonymous Yes. The unitary matrix for QFT is symmetric, which means its inverse (or conjugate transpose) is by taking element-wise conjugate on the matrix . You can see the matrix here: https://en.wikipedia.org/wiki/Quantum_Fourier_transform
In quantum computing, the quantum Fourier transform (for short: QFT) is a linear transformation on quantum bits, and is the quantum analogue of the inverse discrete Fourier transform. The quantum Fourier transform is a part of many quantum algorithms, notably Shor's algorithm ...
Avatar
Anonymous 23-Jul-20 06:34 AM
@Anonymous thanks and where can I get the circuit for the inverse QFT?
Found it. Thanks
Avatar
Anonymous 23-Jul-20 06:37 AM
I was getting an error that QuantumCircuit is not defined in lab 1
I have to import from qiskit but there's a instruction for bot change anything in main function
❔ 1
Avatar
Anonymous 23-Jul-20 06:41 AM
You may need to re-run some of the earlier cells with import commands perhaps
Avatar
Anonymous 23-Jul-20 06:51 AM
Thank you @Anonymous
👍 1
Avatar
Anonymous 23-Jul-20 07:06 AM
Can we submit multiple times, the lab assignment until we get correct one
Avatar
Anonymous 23-Jul-20 07:09 AM
yes
Avatar
Anonymous 23-Jul-20 07:11 AM
Can we submit multiple times, the lab assignment until we get correct one
@Anonymous SATYA SAI can do
Avatar
Anonymous 23-Jul-20 07:37 AM
@Anonymous theoretical circuit is matching with the circuit i got but it was giving as circuit not matched
Avatar
Anonymous 23-Jul-20 07:38 AM
Can you share the circuit diagram?
Avatar
Anonymous 23-Jul-20 07:39 AM
can you show us
Avatar
Anonymous 23-Jul-20 07:41 AM
@Anonymous i will. Can i send it afterwards. Stuck with charge in my lap
Avatar
Anonymous 23-Jul-20 07:46 AM
okay
Avatar
Anonymous 23-Jul-20 07:46 AM
Can anyone please help me out with the correct syntax for this?
Avatar
Anonymous 23-Jul-20 07:47 AM
you left ":" (edited)
colon (edited)
Avatar
Anonymous 23-Jul-20 07:47 AM
Oof
Thanks
Avatar
Anonymous 23-Jul-20 07:48 AM
: colon
Avatar
Anonymous 23-Jul-20 07:48 AM
Btw is the ; necessary too?
Avatar
Anonymous 23-Jul-20 07:52 AM
@Anonymous no need for ; in Python
Avatar
Anonymous 23-Jul-20 08:00 AM
@Anonymous this is the circuit i got
Avatar
Anonymous 23-Jul-20 08:04 AM
you messed up with the Z and X in the last part
an 𝑋 gate is applied on Bob's qubit if the measurement coutcome of Alice's second qubit, clbit2_Alice, is 1. a 𝑍 gate is applied on Bob's qubit if the measurement coutcome of Alice's first qubit, clbit1_Alice, is 1.
you did it other way around
Avatar
Anonymous 23-Jul-20 08:12 AM
@Anonymous thank you. I will correct it
Avatar
Anonymous 23-Jul-20 08:32 AM
@Anonymous yup but in our case its the top most n-1 qubits so why not use range(n)
@Anonymous top most means measurement qubits ???
Avatar
Anonymous 23-Jul-20 08:36 AM
by top most i meant n-1 qubit counter from top (edited)
Avatar
Anonymous 23-Jul-20 08:46 AM
Anyone know why this swap isn't working?
It says 'range' object is not callable
Avatar
Anonymous 23-Jul-20 08:46 AM
maybe n is odd
dude
you cant call measurment qubit it self
try for i in range (n) (edited)
Avatar
Anonymous 23-Jul-20 08:47 AM
I did both. Also calling measurement_qubits works, I tried it in the initialization when I had to put H on all of them
Avatar
Anonymous 23-Jul-20 08:48 AM
measurement_cubit followed by box brackets @Anonymous
Avatar
Anonymous 23-Jul-20 08:48 AM
for i in range(int((n-n%2)/2)): given_circuit.swap(measurement_qubits[i],measurement_qubits[n-1-i])
Avatar
Anonymous 23-Jul-20 08:48 AM
Not simple brackets
Avatar
Anonymous 23-Jul-20 08:48 AM
try this
Avatar
Anonymous 23-Jul-20 08:48 AM
Okay thanks
Avatar
Anonymous 23-Jul-20 08:50 AM
@Anonymous @Anonymous thank you 🙂
👍 1
Avatar
Anonymous 23-Jul-20 09:12 AM
What's this error?
Avatar
Anonymous 23-Jul-20 09:16 AM
@Anonymous Does your qpe_program function return a circuit (of type QuantumCircuit, of course)?
Avatar
Anonymous 23-Jul-20 09:17 AM
Yeah
@Anonymous Does your qpe_program function return a circuit (of type QuantumCircuit, of course)?
@Anonymous I corrected it, thanks (edited)
Avatar
Anonymous 23-Jul-20 09:18 AM
Ok. May I see the qpe_program function?
Avatar
Anonymous 23-Jul-20 09:19 AM
I messed up a bit, I'd deleted the return line by mistake
Thanks
Avatar
Anonymous 23-Jul-20 09:19 AM
Now it makes sense
Cheers
Avatar
Anonymous 23-Jul-20 09:58 AM
I noticed that with the program I wrote I got a correct grade for theta = 0.5 or in general theta = (1/2^n), but if I out something really crazy like theta = 1/3 or something, it gives me an incorrect answer... Is this expected, or there is a reason that I cannot immediately see here? (in general a fraction will need arbitrary terms of binary terms) ... tried increasing shot count and also # of qubits to say 16... but that just prolongs the calculation. (edited)
Avatar
Anonymous 23-Jul-20 10:34 AM
Still getting this error for lab2, please help
Avatar
Anonymous 23-Jul-20 10:58 AM
Why the IQFT has swap function applied?
Avatar
Anonymous 23-Jul-20 11:09 AM
To reverse the order of qubits
QFT that is built into qiskit
Reverses the order of qubuts
Lol qubuts
In lecture 3 abraham showed how to make a QFT that doesnt reverse the order
However when we use qft we will need swaps at the end to reverse the order back
Hope that makes sense
Id recommend watching the lecture again
👍 2
Avatar
Anonymous 23-Jul-20 12:01 PM
Can someone help me with a question:
Write the state: |ψ⟩=12√|00⟩+i2√|01⟩ as two separate qubits. that's 1/root(2)
and (j/root(2))
Avatar
Anonymous 23-Jul-20 12:04 PM
In lab3, when I use the QFT from the Qiskit library and set inverse to True/False I get the same answer why is that?
Avatar
Anonymous 23-Jul-20 12:07 PM
is that correct circuit for lab3?
Avatar
Anonymous 23-Jul-20 12:08 PM
I really don't know why we apply the x gate at this part:
Avatar
Anonymous 23-Jul-20 12:09 PM
So it sets the state to |1>
Avatar
Anonymous 23-Jul-20 12:09 PM
I really don't know why we apply the x gate at this part:
@Anonymous the not gate initiate the state into state one
Avatar
Anonymous 23-Jul-20 12:11 PM
and we will have only one qubit that will be a target_qubit ?
I mean, only one gate x it's used?
Avatar
Anonymous 23-Jul-20 12:12 PM
and we will have only one qubit that will be a target_qubit ?
@Anonymous yup
you can also use initialize() to set the state to |1> if you dont like this method
Avatar
Anonymous 23-Jul-20 12:14 PM
@Anonymous yup
@Anonymous oh nice, thank you (edited)
Avatar
Anonymous 23-Jul-20 12:19 PM
@Anonymous an exercise question from the textbook:
Write the state: |ψ⟩=12√|00⟩+i2√|01⟩ as two separate qubits. that's 1/root(2) and (j/root(2))
Would th answer be be something like (alpha) qubit 1 tensor (beta) qubit 2
?
Avatar
Anonymous 23-Jul-20 12:24 PM
Write the state: |ψ⟩=12√|00⟩+i2√|01⟩ as two separate qubits. that's 1/root(2) and (j/root(2))
@Anonymous This state can be written as |0> times 1/sqrt(2)(|0> + i |1>) (edited)
Avatar
Anonymous 23-Jul-20 12:25 PM
Yeah That should be it
Avatar
Anonymous 23-Jul-20 12:27 PM
@Anonymous SAPV - So the last state, can it be generated from one qubit? The question specificallky asks for two qubits
Avatar
Anonymous 23-Jul-20 12:28 PM
@Anonymous SAPV - So the last state, can it be generated from one qubit? The question specificallky asks for two qubits
@Anonymous It does have two qubits. The first qubit being just |0> and the second qubit being 1/sqrt(2)(|0> + i |1>)
@Anonymous SAPV - So the last state, can it be generated from one qubit? The question specificallky asks for two qubits
@Anonymous By last state do you mean just 1/sqrt(2)(|0> + i |1>)?
Avatar
Anonymous 23-Jul-20 12:29 PM
yes
How do I get that state from |0>
Avatar
Anonymous 23-Jul-20 12:30 PM
How do I get that state from |0>
@Anonymous Oh. You just apply the H gate first and then the S gate.
Avatar
Anonymous 23-Jul-20 12:30 PM
Got it. Thanks!
👍 1
Avatar
Anonymous 23-Jul-20 12:38 PM
Hello Everyone, Can anyone help me verify what the equation is after applying just the 1st controlled U in the QPE Circuit?
Avatar
Anonymous 23-Jul-20 12:47 PM
Notes for today released??
Avatar
Anonymous 23-Jul-20 12:47 PM
Hello Everyone, Can anyone help me verify what the equation is after applying just the 1st controlled U in the QPE Circuit?
@Anonymous K. looks good to me
Notes for today released??
@Anonymous you can find the notes in #announcements ,but todays has not yet been released
Avatar
Anonymous 23-Jul-20 12:48 PM
@Anonymous you can find the notes in #announcements ,but todays has not yet been released
@Anonymous thanks bro
Avatar
Anonymous 23-Jul-20 01:03 PM
todays lab
Avatar
Anonymous 23-Jul-20 01:04 PM
@Anonymous Hey So I guess it isnt. Check out https://discord.com/channels/729706617951485954/734166876631859220/735901080004591708 I think we need to explicitly write it as a sum and then group the terms together at the end after all the Controlled Us. only then wld the output look like the way it does in the lectures.
Avatar
Anonymous BOT 23-Jul-20 01:18 PM
🗑 5
Avatar
Anonymous 23-Jul-20 01:29 PM
is it correct this code
it is of the first lab
Avatar
Anonymous 23-Jul-20 01:30 PM
use c_if to apply if condition on a qubit depending on a classical bit
Avatar
Anonymous 23-Jul-20 01:31 PM
is it correct this code
@Anonymous EL GAILY no its not
👍 1
qc.x(i).c_if(Creg, 1)
use this piece of code
modify it accordingly as you need
it says if Creg is 1 it will apply x gate to
i th qubit
Avatar
Anonymous 23-Jul-20 01:33 PM
i love how we communicate w emojis it's hilarious
react*
Avatar
Anonymous 23-Jul-20 01:36 PM
is it correct now ? @Anonymous (edited)
Avatar
Anonymous 23-Jul-20 01:38 PM
Are the instructions for lab4 out yet?
Avatar
Anonymous 23-Jul-20 01:39 PM
I can not see any lab4 now
@Anonymous Are the instructions for lab4 out yet?
Avatar
Anonymous 23-Jul-20 01:40 PM
no not yet
Avatar
Anonymous 23-Jul-20 01:40 PM
Abe just posted it
Avatar
Anonymous 23-Jul-20 01:40 PM
Avatar
Anonymous 23-Jul-20 01:40 PM
its here
lab 4
Avatar
Anonymous 23-Jul-20 01:41 PM
Is "quantum logic circuit" the long form name of "quantum circuit"? Or is it a different thing?
Avatar
Anonymous 23-Jul-20 01:41 PM
Is "quantum logic circuit" the long form name of "quantum circuit"? Or is it a different thing?
@Anonymous nah i dont think so
they are different i guess
maybe they are the same
Avatar
Anonymous 23-Jul-20 01:42 PM
But a logic circuit in math has same representation of a circuit used in CS.
Avatar
Anonymous 23-Jul-20 01:43 PM
tell me too if you get the answer>
But a logic circuit in math has same representation of a circuit used in CS.
@Anonymous if CS stands for computer science then i got no idea about what you are talking
Avatar
Anonymous 23-Jul-20 01:44 PM
Cool. I dont know where to get the answer for this. But i have seen other people using the term quantum logic circuit
Avatar
Anonymous 23-Jul-20 01:44 PM
Its time for Lab4
Avatar
Anonymous 23-Jul-20 01:51 PM
I have tried to install qiskit a few times now but once I isntall the package through the conda prompt and open a jupyter notebook in the qiskit env I cannot run any code. It successfully imports qiskit but then says 'unknown location'
Avatar
Anonymous 23-Jul-20 01:53 PM
not sure if someone has already discussed this can anyone tell me a general way to create those modular exponentiation gates given a,N and the exponenet (other than the matrix), I mean in terms of gates?
Even in the textbook they do not explain a general approach to create the gates
Avatar
Anonymous 23-Jul-20 01:55 PM
not sure if someone has already discussed this can anyone tell me a general way to create those modular exponentiation gates given a,N and the exponenet (other than the matrix), I mean in terms of gates?
@Anonymous havnt seen them yet but will get back to you asap
Avatar
Anonymous 23-Jul-20 01:57 PM
thank you!
Avatar
Anonymous 23-Jul-20 02:17 PM
@Anonymous @Anonymous
@Anonymous I don't know if you got already an answer for that. But this is what I got. They need to go back to lab1 and run grade(..., force_commit=True) Hope that it helps
Avatar
Anonymous 23-Jul-20 02:17 PM
Why can't the value of a be equal to 4 or 14? (edited)
➕ 2
Avatar
Anonymous 23-Jul-20 02:29 PM
I have a question about exercise 3 in lab 3. We are asked to define the function apply_iqft(given_circuit, measurement_qubits, n) It seems to me that n == len(measurement_qubits). So why do we make the function take on three arguments?
Avatar
Anonymous 23-Jul-20 02:31 PM
I have a question about exercise 3 in lab 3. We are asked to define the function apply_iqft(given_circuit, measurement_qubits, n) It seems to me that n == len(measurement_qubits). So why do we make the function take on three arguments?
@Anonymous It's not really necessary, I guess they did it that way to make things simple
👍 1
Avatar
Anonymous 23-Jul-20 02:35 PM
How come in lab 4 you do not measure the m qubits?
👍 1
Avatar
Anonymous 23-Jul-20 02:35 PM
Guys I am getting the right answer yet I am getting the message that the answer is wrong
Avatar
Anonymous 23-Jul-20 02:35 PM
Why can't the value of a be equal to 4 or 14?
@Anonymous I guess the reason is just that the implementation of the a_x_mod15 only covers a subset of cases
qiskitsmart 2
Avatar
Anonymous 23-Jul-20 02:37 PM
we have to initialize using for loop right?
Avatar
Anonymous 23-Jul-20 02:38 PM
How come in lab 4 you do not measure the m qubits?
@Anonymous I think that the algorithm does not strictly require the measurement of the m qubits, but I guess it is easier to understand with it...
Avatar
Anonymous 23-Jul-20 02:45 PM
How to create a new unitary gate in qiskit? I want to construct :-[sqrt(0.7)Z+sqrt(0.3)X]
Avatar
Anonymous 23-Jul-20 02:46 PM
we have to initialize using for loop right?
@Anonymous Yup. The initialize_qubits function only gets the number of qubits, not the qubits themselves as in other labs
Avatar
Anonymous 23-Jul-20 02:47 PM
QuantumCircuit.Unitary()
Avatar
Anonymous 23-Jul-20 02:50 PM
Avatar
Anonymous 23-Jul-20 02:52 PM
👍
Avatar
Anonymous 23-Jul-20 02:53 PM
@Anonymous Hello, Some of us have noticed, that there has been some inconsistencies about the endianness used between lectures, lab assignements, and the Qiskit textbook Spoiler: In particular, the Shor's circuit that is implemented in the text book (and in the diagram of today's lab notebook) will not work right away, because of this endianness issues It would be nice to have this consistent in order to avoid this inconveniences (edited)
Avatar
Anonymous 23-Jul-20 02:57 PM
I am getting error here with my diagram
Avatar
Anonymous 23-Jul-20 02:58 PM
tricky, AGAIN
Avatar
Anonymous 23-Jul-20 03:00 PM
but not in a good way in my opinion :c
Avatar
Anonymous 23-Jul-20 03:00 PM
endianness??
Avatar
Anonymous 23-Jul-20 03:00 PM
yes
which is what is happening to you as well @Anonymous
Avatar
Anonymous 23-Jul-20 03:03 PM
@Anonymous yo need the QFT† ater the four U
Avatar
Anonymous 23-Jul-20 03:05 PM
@Anonymous yo need the QFT† ater the four U
@Anonymous Maldonado Romo oh yes assuming you have done that after @Anonymous
Avatar
Anonymous 23-Jul-20 03:07 PM
what do you mean by endianness?
Avatar
Anonymous 23-Jul-20 03:07 PM
@Anonymous the order of qubits encoding integer
left to right or right to left
Avatar
Anonymous 23-Jul-20 03:08 PM
The iterpretation of a binary string whether its most significant bit is the leftmost or the rightmost (edited)
Avatar
Anonymous 23-Jul-20 03:09 PM
ah okay
Avatar
Anonymous 23-Jul-20 03:10 PM
@Anonymous I did it but fail
Avatar
Anonymous 23-Jul-20 03:10 PM
@Anonymous I did it but fail
@Anonymous you need IQFT
👍 1
Avatar
Anonymous 23-Jul-20 03:10 PM
@Anonymous you need inverse QFT
👍 1
Avatar
Anonymous 23-Jul-20 03:11 PM
The whole diagram
with mpl
mpl
Avatar
Anonymous 23-Jul-20 03:12 PM
I have problem with the function apply_iqft with the variable measurement_qubits
someone has any idea?
Avatar
Anonymous 23-Jul-20 03:13 PM
What does it say?
Avatar
Anonymous 23-Jul-20 03:13 PM
shouldn't the qubits q4,q5,q6,q7 all be |1> ?
Avatar
Anonymous 23-Jul-20 03:14 PM
@Anonymous This is iqft given_circuit.append(QFT(n , approximation_degree = n,inverse=True), range(n))
Avatar
Anonymous 23-Jul-20 03:14 PM
The whole diagram
@Anonymous Use IQFT not qft
@Anonymous This is iqft given_circuit.append(QFT(n , approximation_degree = n,inverse=True), range(n))
@Anonymous should wotk if not use given_circuit.append(QFT(n , approximation_degree = n).inverse(), range(n))
Avatar
Anonymous 23-Jul-20 03:15 PM
Why are the circuits for modular exponentiation in the lab and in the lecture different? Following the circuit in the lecture gives me correct answers, creating the circuit of lab version doesn't work
💯 1
Avatar
Anonymous 23-Jul-20 03:16 PM
@Anonymous This is iqft given_circuit.append(QFT(n , approximation_degree = n,inverse=True), range(n))
@Anonymous remember the swap
Why are the circuits for modular exponentiation in the lab and in the lecture different? Following the circuit in the lecture gives me correct answers, creating the circuit of lab version doesn't work
@Anonymous bigendian vs littleendian
👍 2
Avatar
Anonymous 23-Jul-20 03:17 PM
Hmm...so apparently no swaps on this one
Avatar
Anonymous 23-Jul-20 03:17 PM
Why are the circuits for modular exponentiation in the lab and in the lecture different? Following the circuit in the lecture gives me correct answers, creating the circuit of lab version doesn't work
@Anonymous because its different (edited)
Use Abe's
Avatar
Anonymous 23-Jul-20 03:17 PM
Hey! I'm wondering that why in Deutch Joza Algorithm we changed the ancilla qubit to |-> state, when theoretically it was said that the the ancillary qubit makes no difference to the calculation?
Avatar
Anonymous 23-Jul-20 03:18 PM
but i got fail lab 4
Avatar
Anonymous 23-Jul-20 03:18 PM
guys see qiskit text book for reference cont try copying it
Avatar
Anonymous 23-Jul-20 03:18 PM
yeh, no swapping in IQFT
Avatar
Anonymous 23-Jul-20 03:18 PM
Question: in the function def modular_exponentiation(given_circuit, n, m, a): I am trying to iterate on argument 'n' to raise it as power on a_x_mod15 funcitons.
>
Error: 'int' object is not iterable
>
Any ideas why?
Avatar
Anonymous 23-Jul-20 03:18 PM
Stick to Abe note
Avatar
Anonymous 23-Jul-20 03:19 PM
@Anonymous because its different
@Anonymous which one
Avatar
Anonymous 23-Jul-20 03:19 PM
but i got fail lab 4
@Anonymous did you get the right counts? if not then you swaped qubits
Avatar
Anonymous 23-Jul-20 03:19 PM
@Anonymous Asthana You need to use range()
Avatar
Anonymous 23-Jul-20 03:19 PM
shouldn't the qubits q4,q5,q6,q7 all be |1> ?
@Anonymous Nope, just the last one. Check here: https://qiskit.org/textbook/ch-algorithms/shor.html#3.-Qiskit-Implementation
Avatar
Anonymous 23-Jul-20 03:19 PM
@Anonymous Asthana You need to use range()
@Anonymous Thanks. I am using range. like 'for q in range(n):'
Avatar
Anonymous 23-Jul-20 03:19 PM
@Anonymous which one
@Anonymous The one we are doing takes |1000> as 1 but in qiskit note book |0001> is taken as 1
so its different
stick to Abe's Notes (edited)
Avatar
Anonymous 23-Jul-20 03:20 PM
@Anonymous thanks! 😀
👍 1
Avatar
Anonymous 23-Jul-20 03:20 PM
@Anonymous bigendian vs littleendian
@Anonymous I think this is wrong because it is not mentioned anywhere and you have to check their code (the one that in theory you should not touch) in order to figure out the issue
Avatar
Anonymous 23-Jul-20 03:20 PM
@Anonymous thanks! 😀
@Anonymous np
Avatar
Anonymous 23-Jul-20 03:20 PM
but maybe is intended as the challenge?
Avatar
Anonymous 23-Jul-20 03:20 PM
@Anonymous I think this is wrong because it is not mentioned anywhere and you have to check their code (the one that in theory you should not touch) in order to figure out the issue
@Anonymous they are changing it right now to make consistent. THere was a link to github fork
Avatar
Anonymous 23-Jul-20 03:21 PM
I've got these wrong measurements but can't understand why, any suggestion?
Avatar
Anonymous 23-Jul-20 03:21 PM
I've got these wrong measurements but can't understand why, any suggestion?
@Anonymous Could you send us the histogram?
Avatar
Anonymous 23-Jul-20 03:21 PM
@Anonymous Could you send us the histogram?
@Anonymous
Avatar
Anonymous 23-Jul-20 03:21 PM
modular_exponentiation
Avatar
Anonymous 23-Jul-20 03:22 PM
@Anonymous they are changing it right now to make consistent. THere was a link to github fork
@Anonymous nice
Avatar
Anonymous 23-Jul-20 03:22 PM
@Anonymous remember the swap
@Anonymous Thanks a lot. This helps me
Avatar
Anonymous 23-Jul-20 03:22 PM
@Anonymous
@Anonymous That's weird. You're apparently getting the correct results
Avatar
Anonymous 23-Jul-20 03:22 PM
@Anonymous Thanks a lot. This helps me
@Anonymous it is not correct
Avatar
Anonymous 23-Jul-20 03:22 PM
@Anonymous That's weird. You're apparently getting the correct results
@Anonymous That's what I don't understand, circuit and all seems all right
Avatar
Anonymous 23-Jul-20 03:23 PM
@Anonymous That's what I don't understand, circuit and all seems all right
@Anonymous Try running the cells again, might be a bug
Avatar
Anonymous 23-Jul-20 03:23 PM
@Anonymous That's what I don't understand, circuit and all seems all right
@Anonymous reverse the bits before measurement
it is an endianness issue
Avatar
Anonymous 23-Jul-20 03:23 PM
@Anonymous Thanks a lot. This helps me
@Anonymous Seeking error
Avatar
Anonymous 23-Jul-20 03:24 PM
@Anonymous reverse the bits before measurement
@Anonymous I had an issue for not reversing the bits, but my histogram was completely different. I guess if he didn't reverse them, the results should have been different
My histogram before reversing
Avatar
Anonymous 23-Jul-20 03:25 PM
@Anonymous That's what I don't understand, circuit and all seems all right
@Anonymous people mentioned before there is endianess issue, just don't do swap for the iqft
Avatar
Anonymous 23-Jul-20 03:25 PM
I didn't swap, sadly
Tried running again, same result but in different order
Avatar
Anonymous 23-Jul-20 03:26 PM
I didn't swap, sadly
@Anonymous did you use qiskit iqft or implemented yourself?
Avatar
Anonymous 23-Jul-20 03:26 PM
@Anonymous I was getting the same as @Anonymous , and removing the swapping solved it. Thanks!
👍 2
Avatar
Anonymous 23-Jul-20 03:26 PM
@Anonymous did you use qiskit iqft or implemented yourself?
@Anonymous qiskit
Avatar
Anonymous 23-Jul-20 03:26 PM
for qiskit ift do you just use QFT.inverse()?
Avatar
Anonymous 23-Jul-20 03:27 PM
@Anonymous qiskit
@Anonymous i think if you use qiskit's inverse of QFT, you automatically get the swap, probably has to implement yourself to get rid of the swaps
Avatar
Anonymous 23-Jul-20 03:27 PM
@Anonymous QFT(inverse=True)
Avatar
Anonymous 23-Jul-20 03:28 PM
@Anonymous , QFT(inverse=True) works. Also, you can use QFT().inverse()
👍 2
Avatar
Anonymous 23-Jul-20 03:28 PM
@Anonymous @Anonymous You can also modify your exponentiation to match the endianess at the end of Abe's lecture notes instead of removing the swaps. (edited)
👍 1
Avatar
Anonymous 23-Jul-20 03:29 PM
@Anonymous i think if you use qiskit's inverse of QFT, you automatically get the swap, probably has to implement yourself to get rid of the swaps
@Anonymous it has optino do_swaps (edited)
👍 1
Avatar
Anonymous 23-Jul-20 03:29 PM
@Anonymous i had the exact same issue/results. the qiskit QFT has a parameter do_swaps that you can set to false which fixed it for me
Avatar
Anonymous 23-Jul-20 03:30 PM
Wrote "do_swaps=False" and it worked, thanks guys!
💯 5
👍 5
😎 3
Avatar
Anonymous 23-Jul-20 03:32 PM
Yeah same Thanks! didnt notice that
Avatar
Anonymous 23-Jul-20 03:33 PM
Thanks @Anonymous ! I had the same error
Avatar
Anonymous 23-Jul-20 03:34 PM
@Anonymous actually it was good the problem was iqft
Avatar
Anonymous 23-Jul-20 03:34 PM
you guys are getting it wrong
its not the IQFT
Avatar
Anonymous 23-Jul-20 03:34 PM
I was having problems, even with the notebook very similar to the reference book. The problem was in the order of the qubits, as mentioned before. It's very confusing. But I got it.
Avatar
Anonymous 23-Jul-20 03:34 PM
its the ordering thats creating the problen
Avatar
Anonymous 23-Jul-20 03:34 PM
Wrote "do_swaps=False" and it worked, thanks guys!
@Anonymous had the same error this worked. Thanks
Avatar
Anonymous 23-Jul-20 03:35 PM
I was having problems, even with the notebook very similar to the reference book. The problem was in the order of the qubits, as mentioned before. It's very confusing. But I got it.
@Anonymous just the ordering is reversed
Avatar
Anonymous 23-Jul-20 03:35 PM
@Anonymous just the ordering is reversed
@Anonymous no_swaps is an easier solution than reversing the order. Abe said in the instructions video himself!
Avatar
Anonymous 23-Jul-20 03:36 PM
its not the IQFT
@Anonymous Is the QFT dagger , right?
Avatar
Anonymous 23-Jul-20 03:36 PM
Have you guys tried increasing n to 8 as in the book? It fails to factor 😦
Avatar
Anonymous 23-Jul-20 03:37 PM
Wrote "do_swaps=False" and it worked, thanks guys!
@Anonymous Good
Avatar
Anonymous 23-Jul-20 03:37 PM
@Anonymous probably your append of a_x_mod15 was wrong
Avatar
Anonymous 23-Jul-20 03:37 PM
I have a problem there also
how do you append the target qubits?
Avatar
Anonymous 23-Jul-20 03:38 PM
Here's the thing I found, the instructions in the notebook say that only the last target qubit is supposed to be set to |1> . I followed it and reversed the last qubit only. That along with @Anonymous 's "do_swaps = False" gave the expected answer. I tried out the cricuit design where all the target qubits were set to |1> by using X Gate and that failed.
Avatar
Anonymous 23-Jul-20 03:39 PM
@Anonymous what do you mean that that my append is wrong?
Avatar
Anonymous 23-Jul-20 03:40 PM
@Anonymous , create a list where the first element is the control qubit and the rest of the elements are the target qubit. Pass it on as the second argument of .append() . The first argument would be a_x_mod15(,) .
Avatar
Anonymous 23-Jul-20 03:40 PM
@Anonymous your exponentiation is strange, you get 64/128/192, where you should get 4/8/12
Avatar
Anonymous 23-Jul-20 03:40 PM
@Anonymous B Thanks!
Avatar
Anonymous 23-Jul-20 03:41 PM
Why is the do_swaps needed? Otherwise I am getting the wrong answer
do_swaps = False
Avatar
Anonymous 23-Jul-20 03:41 PM
@Anonymous it's a problem on the bit ordering
With no swap they arrive in correct order to the classic function
👍 1
Avatar
Anonymous 23-Jul-20 03:42 PM
Guys plz stick to the notes Abe gave us. Dont just remove swap from IQFT. Try to understand the point and what the series is being reversed in your code
Avatar
Anonymous 23-Jul-20 03:42 PM
@Anonymous , the QFT in cricuits library of Qiskit implements a SWAP by default. This is why you need to set it to False. This was mentioned when Abe was showing the difference between his implementation and the one in the library in Lecture 3.
👍 2
Avatar
Anonymous 23-Jul-20 03:42 PM
I see, thanks
And my previous code for iqft was qft_inv = qiskit.circuit.library.QFT(n).inverse() given_circuit.append(qft_inv, measurement_qubits)
These 2 lines worked perfectly yesterday
Avatar
Anonymous 23-Jul-20 03:45 PM
@Anonymous R So you have been given 2 methods to apply qft
Avatar
Anonymous 23-Jul-20 03:45 PM
YEs
Avatar
Anonymous 23-Jul-20 03:45 PM
ok
Avatar
Anonymous 23-Jul-20 03:45 PM
first to use QFT class from qiskit
Avatar
Anonymous 23-Jul-20 03:45 PM
The inbuilt and the build it yourself
Avatar
Anonymous 23-Jul-20 03:45 PM
But today they didn't. I had to use given_circuit.append(QFT(n, approximation_degree = n, inverse = True, do_swaps = False), range(n))
Avatar
Anonymous 23-Jul-20 03:45 PM
and second build your own
Avatar
Anonymous 23-Jul-20 03:45 PM
yes
Avatar
Anonymous 23-Jul-20 03:45 PM
Avatar
Anonymous 23-Jul-20 03:45 PM
Inverse QFT
I tried this
Avatar
Anonymous 23-Jul-20 03:46 PM
You can use this diagram to make your own
and can use given_circuit.append(QFT(n).inverse(), measurement_qubits)
to use qiskit QFT class
Avatar
Anonymous 23-Jul-20 03:47 PM
that easy surely not
Avatar
Anonymous 23-Jul-20 03:47 PM
but i will recommend to try building it yourself
that easy surely not
@Anonymous yup thats all you have to do
Avatar
Anonymous 23-Jul-20 03:48 PM
Wrote "do_swaps=False" and it worked, thanks guys!
This idea worked like a charm! Just removed the swap code and voila! Thanks everyone!
PS: My qft was a build (inspired by many of you ofc!)
Avatar
Anonymous 23-Jul-20 03:50 PM
The histogram is also somewhat misleading, when it plots 0000, 0100, 1000, 1100 on x-axis with equal probabilities it says Measured 0,1,2,3
Avatar
Anonymous 23-Jul-20 03:50 PM
The diagram at the beginning of the lab is misleading. You either need to apply these c-U-gate from the last measurement qubit going up, or apply the highest power of U first. The qft_dagger from the textbook undo this difference. (edited)
Avatar
Anonymous 23-Jul-20 03:51 PM
But when it plots 0000, 0001, 0010, 0011 it says measured 0,4,8.12....which gives the right answer
Avatar
Anonymous 23-Jul-20 03:51 PM
This idea worked like a charm! Just removed the swap code and voila! Thanks everyone!
@Anonymous please note why you are doing it. It's not a trick or something. You are reversing the order of the binary
Avatar
Anonymous 23-Jul-20 03:53 PM
@Anonymous please note why you are doing it. It's not a trick or something. You are reversing the order of the binary
@Anonymous Yes I have noted that. I was not sure about it initially but I finally did realize it. Thanks!
Avatar
Anonymous 23-Jul-20 03:53 PM
q_0: ┤ H ├─■─────■─────■─────■─────■─────■─────■─────■─────■─────■─────■────» ├───┤ │ │ │ │ │ │ │ │ │ │ │ » q_1: ┤ H ├─┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼────» ├───┤ │ │ │ │ │ │ │ │ │ │ │ » q_2: ┤ H ├─┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼────» ├───┤ │ │ │ │ │ │ │ │ │ │ │ » q_3: ┤ H ├─┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼────» ├───┤ │ │ │ │ │ │ │ │ │ │ │ » q_4: ┤ H ├─┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼────» ├───┤ │0.5 │0.5 │0.5 │0.5 │0.5 │0.5 │0.5 │0.5 │0.5 │0.5 │0.5 » q_5: ┤ X ├─■─────■─────■─────■─────■─────■─────■─────■─────■─────■─────■────» └───┘ » c_0: ═══════════════════════════════════════════════════════════════════════» » c_1: ═══════════════════════════════════════════════════════════════════════» » c_2: ═══════════════════════════════════════════════════════════════════════» » c_3: ═══════════════════════════════════════════════════════════════════════» » c_4: ═══════════════════════════════════════════════════════════════════════» »
@Anonymous first off all you should have m+n qubits
you only have 5
it should be 8
Avatar
Anonymous 23-Jul-20 03:53 PM
what?
Avatar
Anonymous 23-Jul-20 03:54 PM
which lab are you taking about
its from lab3
okay sorry
Avatar
Anonymous 23-Jul-20 03:54 PM
@Anonymous but now I am confused about the ordering of the m qubits, do they need to be reversed? Why/why not?
Avatar
Anonymous 23-Jul-20 03:55 PM
what?
@Anonymous can you use send a screen shot please
Avatar
Anonymous 23-Jul-20 03:55 PM
Why is the x-axis showing 0000, 0001, 0010, 0011?
Avatar
Anonymous 23-Jul-20 03:55 PM
I set n to 5 when testing
Avatar
Anonymous 23-Jul-20 03:56 PM
@Anonymous but now I am confused about the ordering of the m qubits, do they need to be reversed? Why/why not?
@Anonymous see if you stick to Abe's notes the reverse wont be needed
but people are not doing that
they are using code given in qiskit notebook
Avatar
Anonymous 23-Jul-20 03:56 PM
no actually I didnt
n was 5 from the beginning (edited)
Avatar
Anonymous 23-Jul-20 03:57 PM
@Anonymous your exponentiation is strange, you get 64/128/192, where you should get 4/8/12
@Anonymous I have said in my message that I have 8 qubits now. For testing purposes
Avatar
Anonymous 23-Jul-20 03:57 PM
see this
@Anonymous
Avatar
Anonymous 23-Jul-20 03:57 PM
@Anonymous is this correct? given_circuit.u1(2pitheta*exponent, control_qubit, target_qubit) (edited)
Avatar
Anonymous 23-Jul-20 03:58 PM
in Abe's note the U gates are used in reverse order compared to that of qiskit notebook
Avatar
Anonymous 23-Jul-20 03:58 PM
@Anonymous I actually was able to implement both ways, while using the lab circuit I turned off the swaps in QFT, while in Abe's circuit I didn't. But, my other m qubits were in the same order both the times
Avatar
Anonymous 23-Jul-20 03:58 PM
if you completely follow any of them then you will get it write
Avatar
Anonymous 23-Jul-20 03:59 PM
Histogram
Avatar
Anonymous 23-Jul-20 03:59 PM
I got it right both ways
Avatar
Anonymous 23-Jul-20 03:59 PM
It doesn't seem to work
Avatar
Anonymous 23-Jul-20 04:00 PM
but people are blindely copying the qiskit notebook code not realizing that the classical part of lab has been done to according to the Abe's notes U order
so to get through they are removing that swap gate
Histogram
@Anonymous show me the circuit diagram please
Avatar
Anonymous 23-Jul-20 04:03 PM
CircuitLab31
That's the last bit so I have a iqft
Avatar
Anonymous 23-Jul-20 04:03 PM
your CU is wrong
Avatar
Anonymous 23-Jul-20 04:04 PM
Circuit
I think the first bit is right
Avatar
Anonymous 23-Jul-20 04:04 PM
@Anonymous I recommend to change the wording in lab4 at the beginnning from "We also initialize the 𝑚 target qubits in the state |1⟩" to "We also initialize the 𝑚th target qubit in the state |1⟩" since only the last qubit is swapped, or am I missing something here.
Avatar
Anonymous 23-Jul-20 04:04 PM
maybe the middle bit is a bit off
Avatar
Anonymous 23-Jul-20 04:04 PM
Circuit
@Anonymous wait
Avatar
Anonymous 23-Jul-20 04:05 PM
Why is the x-axis showing 0000, 0001, 0010, 0011?
@Anonymous Guys any idea on this? The correct answer histogram shows this
Avatar
Anonymous 23-Jul-20 04:06 PM
maybe the middle bit is a bit off
@Anonymous it should look somthing like this
👍 1
Avatar
Anonymous 23-Jul-20 04:07 PM
I
@Anonymous Guys any idea on this? The correct answer histogram shows this
@Anonymous Okay I get it....someone mentioned it.....its showing in reverse order
Avatar
Anonymous 23-Jul-20 04:08 PM
Middle bit of Circuit Lab 3
How did you deal with the exponent
Avatar
Anonymous 23-Jul-20 04:09 PM
@Anonymous yes I accidentally deleted my comment. yes, reversed order compared to Nielsen Chuang
Avatar
Anonymous 23-Jul-20 04:09 PM
because I just put however many in a row
Avatar
Anonymous 23-Jul-20 04:09 PM
Thank you @Anonymous Preis
Avatar
Anonymous 23-Jul-20 04:09 PM
given_circuit.append(QFT(len(measurement_qubits), approximation_degree = len(measurement_qubits), inverse = True, do_swaps = False), measurement_qubits) and given_circuit.append(QFT(len(measurement_qubits), approximation_degree = len(measurement_qubits), do_swaps = False).inverse(), measurement_qubits) are equivalent?
Avatar
Anonymous 23-Jul-20 04:11 PM
Middle bit of Circuit Lab 3
@Anonymous there is a trick i will tell you Check that whats U(thata)^2 you will find out that U(theta)^2 is equivalant to U(2*theta) tey using that for exponent
👍 1
btw YOur U is correct as it is
you only sent the last part of circuit and i thought its all
but if you see U is defined as (2* pi*theta) i think you multiplied 2 pi to it
just use 2* pi * theta insted of theta in that section
💯 1
Avatar
Anonymous 23-Jul-20 04:16 PM
OMG
I missed out the 2*pi they told you have to use
that's soo annoyinh
that's all
literally submitted it now
Avatar
Anonymous 23-Jul-20 04:16 PM
@Anonymous I recommend to change the wording in lab4 at the beginnning from "We also initialize the 𝑚 target qubits in the state |1⟩" to "We also initialize the 𝑚th target qubit in the state |1⟩" since only the last qubit is swapped, or am I missing something here.
@Anonymous Preis agree
Avatar
Anonymous 23-Jul-20 04:17 PM
and I changed it to multiply it by the exponent (edited)
instead of adding all the gates but that the same thing but in a different way
Thanks @Anonymous Legendary help
Lab 4 here I come (edited)
Avatar
Anonymous 23-Jul-20 04:18 PM
is the exponentiation function supposed to run all of the control U's, or is it being called multiple times for eah?
Avatar
Anonymous 23-Jul-20 04:19 PM
Its the same
Basically you can multiply the matrices together or put them next to each other in the circuit or you can multiply it by theta
Avatar
Anonymous 23-Jul-20 04:20 PM
This is my circuit. Where am I wrong?
Avatar
Anonymous 23-Jul-20 04:21 PM
This is my circuit. Where am I wrong?
@Anonymous looks good. Problem might be inside iqft
Avatar
Anonymous 23-Jul-20 04:21 PM
gate = QFT(num_qubits=len(measurement_qubits), approximation_degree=len(measurement_qubits),inverse=True, insert_barriers=True, name='iqft') given_circuit.append(gate, measurement_qubits)
this is my implementation
what am I missing?
Avatar
Anonymous 23-Jul-20 04:22 PM
bit ordering. Abe mentioned it ion the lecture
👍 2
Avatar
Anonymous 23-Jul-20 04:24 PM
This is my circuit. Where am I wrong?
@Anonymous
Avatar
Anonymous 23-Jul-20 04:24 PM
Any idea how to implement def modular_exponentiation(given_circuit, n, m, a): ? (lab 4)
Avatar
Anonymous 23-Jul-20 04:25 PM
Try to make
This is my circuit. Where am I wrong?
@Anonymous See abe's note and see if your circuit resembles his
Avatar
Anonymous 23-Jul-20 04:26 PM
i dont seem to need given_circuit for the modular_exponentiation method, yet it is given as a parameter
Avatar
Anonymous 23-Jul-20 04:26 PM
Avatar
Anonymous 23-Jul-20 04:26 PM
ah Thanks Codie
@Anonymous
Avatar
Anonymous 23-Jul-20 04:29 PM
This is wrong:
def modular_exponentiation(given_circuit, n, m, a): for i in range(n): given_circuit.append(a_x_mod15(a,2**i), list(range(n)).append([n+1]))
Any idea how to use a_x_mod15 in given_circuit.append ?
Avatar
Anonymous 23-Jul-20 04:30 PM
you got every thing right
just try thinking about the qubits you wanna append it on
for i = 0 it will be appended on [0,4,5,6,7]
for i = 2 it will be [1,4,5,6,7] and so on.
and i highly recommend you matching your circuit with Abe's one
👍 1
Avatar
Anonymous 23-Jul-20 04:33 PM
For i=1 Will ve [1,4,5,6,7]
Avatar
Anonymous 23-Jul-20 04:34 PM
if I'm understanding this correctly, from the nth qubit, we exponentiate the U operator 2^n times (starting from 0), and the operator should correspond to a^x (mod 15) with x = 2**(n - qubit_number -1). Is there something I'm missing here
Avatar
Anonymous 23-Jul-20 04:37 PM
the exponentiation is done by method a_x_mod15(a, x) due to the for loop
Avatar
Anonymous 23-Jul-20 04:37 PM
right, but this value of x is 2**(n - qubit_number -1)?
Avatar
Anonymous 23-Jul-20 04:38 PM
right, but this value of x is 2**(n - qubit_number -1)?
@Anonymous yup
Avatar
Anonymous 23-Jul-20 04:38 PM
Can someone please send the notes for day 3?
Avatar
Anonymous 23-Jul-20 04:39 PM
Avatar
Anonymous 23-Jul-20 04:39 PM
Can someone please send the notes for day 3?
@Anonymous YOu can find it in #lab-exercises
Avatar
Anonymous 23-Jul-20 04:39 PM
thanks
Avatar
Anonymous 23-Jul-20 04:41 PM
Nice, finally modular_exponentiation is working :) Thanks @Anonymous
Avatar
Anonymous 23-Jul-20 04:41 PM
Nice, finally modular_exponentiation is working :) Thanks @Anonymous
@Anonymous Ataei Happy to help (edited)
Avatar
Anonymous 23-Jul-20 04:43 PM
I've been only measuring 0 somehow 😂
Avatar
Anonymous 23-Jul-20 04:44 PM
I've been only measuring 0 somehow 😂
@Anonymous can you show us your circuit
Avatar
Anonymous 23-Jul-20 04:44 PM
There are more control ops following. 1, then 2, then 4, etc. (edited)
Avatar
Anonymous 23-Jul-20 04:44 PM
if I'm understanding this correctly, from the nth qubit, we exponentiate the U operator 2^n times (starting from 0), and the operator should correspond to a^x (mod 15) with x = 2**(n - qubit_number -1). Is there something I'm missing here
@Anonymous
@Anonymous Thanks mate, I was having the same issue, that hint helped.
Avatar
Anonymous 23-Jul-20 04:45 PM
There are more control ops following. 1, then 2, then 4, etc.
@Anonymous looks great
what about the IQFT
Avatar
Anonymous 23-Jul-20 04:45 PM
@Anonymous Thanks!
Avatar
Anonymous 23-Jul-20 04:46 PM
did you apply IQFT to the measerment qubit
@Anonymous Thanks!
@Anonymous U happy to help
Avatar
Anonymous 23-Jul-20 04:46 PM
I used the same IQFT I used in the previous lab!
Avatar
Anonymous 23-Jul-20 04:47 PM
I applied iqft to the measurements qubits, yes
Avatar
Anonymous 23-Jul-20 04:47 PM
My guess is there's an error here I'm missing
Avatar
Anonymous 23-Jul-20 04:47 PM
I used QFT(n, name = 'iqft', inverse=True)
Avatar
Anonymous 23-Jul-20 04:47 PM
There are more control ops following. 1, then 2, then 4, etc.
@Anonymous why do you have two controls on qubit 1?
Avatar
Anonymous 23-Jul-20 04:48 PM
yes that was my problem too
n-q-1
2**n-q-1
Avatar
Anonymous 23-Jul-20 04:48 PM
Is the exponentiation not done by applying the original control op that many times?
Avatar
Anonymous 23-Jul-20 04:49 PM
no, as said, there is a for loop that repeats the operation x iteration times
Avatar
Anonymous 23-Jul-20 04:49 PM
Using the c_U gate returned by the mod function we were given?
Avatar
Anonymous 23-Jul-20 04:49 PM
use given qubit insted of given qubit[:n]
Avatar
Anonymous 23-Jul-20 04:50 PM
@Anonymous Preis maybe I'm misunderstanding? I thought the for does the a^x in the loop, but we still need to apply an exponentiation of the operator?
Avatar
Anonymous 23-Jul-20 04:50 PM
@Anonymous I think that happens in the a_x_mod15 function, but then you've got put 2**(n-x-1) in the modular_exponentiation
Avatar
Anonymous 23-Jul-20 04:51 PM
Oh ahhh I think I see
I'm basically doubling the exponentiations. let me try that
Avatar
Anonymous 23-Jul-20 04:51 PM
yes
Avatar
Anonymous 23-Jul-20 04:52 PM
Does anybody know why Mr. Abe initialized w's bits at the |0> state, but the lab asks us to initialize them at state |1>?
Avatar
Anonymous 23-Jul-20 04:52 PM
@Anonymous Preis my bad I totally misunderstood what you were saying! Thank you (and @Anonymous U )
Avatar
Anonymous 23-Jul-20 04:53 PM
Is it right to assume you have to make a unitary matrix out of the function and then proceed onto making the circuit?
Avatar
Anonymous 23-Jul-20 04:53 PM
@Anonymous 👍
Avatar
Anonymous 23-Jul-20 04:59 PM
@Anonymous I think the first measurement units are all 0 and the target units are a the ones in the input list
so that if you gave an input 1010 then [1,3] would be the target
because you cant to make 1010 from starting at 0000 and then apply the x gate to the 1st and 3rd qubits
so you would end up with 00001010
and then applying the Hadamard to the first four
H0000
to get H(0000)1010
so the initialisation is H(0000)x(0)0x(0)0
@Anonymous if you get further than that because now well most likely both be stuck on the second step 😄
Avatar
Anonymous 23-Jul-20 05:05 PM
What's the reason why the order of U^x is 2^(n-1), 2^(n-2),..., 2^0 instead of the other way around?
I got confused between reading the book and following the lecture
Avatar
Anonymous 23-Jul-20 05:07 PM
I don't think it makes any difference I believe it the operator U is Commumative
so U1U2 = U2U1
Avatar
Anonymous 23-Jul-20 05:08 PM
I meant when it's applied to qubits
Avatar
Anonymous 23-Jul-20 05:10 PM
I think it is commutative if it is applied to the qubits too. I think that's how you prove that they commute
U1U2 psi> = U2U1 psi>
where psi> is the qubit
I may be wrong though but I think rotations commute as long as they are in one axis of rotation
Avatar
Anonymous 23-Jul-20 05:12 PM
This is the difference I'm confused about
Am I not understanding the notation correctly?
I thought these two diagrams have different orders (edited)
Avatar
Anonymous 23-Jul-20 05:15 PM
Oh yeah that's different
the connecting lines are different
Avatar
Anonymous 23-Jul-20 05:16 PM
Yeah I got confused about why they are different
Avatar
Anonymous 23-Jul-20 05:16 PM
If each operator had the connecting line to the right qubit then it doesn't matter which order they are in
Avatar
Anonymous 23-Jul-20 05:16 PM
This is what I measured
Measured 15 Measured 0 Measured 2 Measured 7 Measured 3 Measured 9 Measured 5 Measured 11 Measured 1 Measured 14 Measured 13 Measured 6 Measured 10
No idea what I did wrong. This is the circuit:
Any idea?
Avatar
Anonymous 23-Jul-20 05:16 PM
I did that the first time because the diagram at the beginning of the notebook looks like this one
Avatar
Anonymous 23-Jul-20 05:16 PM
How are you guys appending the a_xmod15?
im completely stuck
Avatar
Anonymous 23-Jul-20 05:17 PM
qc.h(range(n))
Avatar
Anonymous 23-Jul-20 05:17 PM
@Anonymous Ataei the qft definition in the quiskit library does not fit to your order of the controlled U gates
👍 1
Avatar
Anonymous 23-Jul-20 05:18 PM
@Anonymous Ataei exponentials should go from 8(2^(n-1)) to 1(2^0). you have the reverse
👍 1
Avatar
Anonymous 23-Jul-20 05:19 PM
Wait is the qft in the library the reason why the order of power is reversed?
Compared to in the book where they wrote the qft_dagger function?
Avatar
Anonymous 23-Jul-20 05:20 PM
yes, I think so
Avatar
Anonymous 23-Jul-20 05:20 PM
Ok. Thanks! I got really confused there
Avatar
Anonymous 23-Jul-20 05:20 PM
In the lectures the exponents were different
Avatar
Anonymous 23-Jul-20 05:21 PM
How are people appending to the circuit
Avatar
Anonymous 23-Jul-20 05:21 PM
Thanks guys, let me try to fix exponentials first.
Avatar
Anonymous 23-Jul-20 05:21 PM
Pass the function call and a list of qubits it applies to to the .append() method of the circuit?
Avatar
Anonymous 23-Jul-20 05:22 PM
so is it given_circuit.append(a_x_mod15(2,3)) for example
Avatar
Anonymous 23-Jul-20 05:23 PM
You also need a list of qubits it's applied to
like [1, 4,5,6,7] or something (edited)
Avatar
Anonymous 23-Jul-20 05:23 PM
Compared to in the book where they wrote the qft_dagger function?
@Anonymous in the textbook? yes there they define a custom qft
Avatar
Anonymous 23-Jul-20 05:23 PM
given_circuit.append(a_x_mod15(2,3)[1,2])?
Avatar
Anonymous 23-Jul-20 05:23 PM
Finally, done. Thanks guys. @Anonymous Sourounis and @Anonymous Preis: Thanks
Avatar
Anonymous 23-Jul-20 05:24 PM
@Anonymous in the textbook? yes there they define a custom qft
@Anonymous Preis yeah I wasn't aware that the custom qft does things differently from the one in the library, so I got confused. Thank you!
Avatar
Anonymous 23-Jul-20 05:25 PM
@Anonymous Thanks mate got it
Avatar
Anonymous 23-Jul-20 05:32 PM
Guys plz stick to the notes Abe gave us. Dont just remove swap from IQFT. Try to understand the point and what the series is being reversed in your code
@Anonymous It took me a while to get your point. Fortunately I used the modular_exponentiation function you suggested several lines below, removed the swap and resubmitted the lab. Thanks 😄
Avatar
Anonymous 23-Jul-20 05:37 PM
I have tried a=2,7,8,11,13 and all cases work accept 11. Can someone tell me the reason? (edited)
Avatar
Anonymous 23-Jul-20 05:44 PM
What exactly do the swaps do in the a_x_mod15 function? Have been stuck for a while trying to understand the implementation
👍 2
Avatar
Anonymous 23-Jul-20 06:01 PM
A_x_mod15 is suppose to add a mod 15 to |y>. For |1> input and known a and 15 they constructed the rules. Right?
Avatar
Anonymous 23-Jul-20 06:11 PM
😫
Avatar
Anonymous 23-Jul-20 06:12 PM
I have tried a=2,7,8,11,13 and all cases work accept 11. Can someone tell me the reason?
@Anonymous Same issue here with 11. I just realised that 11**2 mod 15 is already 1, so the order of 11 mod 15 is 2, thus the last two U gates in the circuit are actually the same as the first two
Avatar
Anonymous 23-Jul-20 06:13 PM
Hi I think I have the right circuit but I cant seem to simulate it
Avatar
Anonymous 23-Jul-20 06:18 PM
I have a couple of naive questions about lab4: (1) in the code for a_x_mod15, what do "to_gate()" and "control()" do? (2) why do we initialize target qubits to |1>?
Avatar
Anonymous 23-Jul-20 06:19 PM
qc.h(range(n))
@Anonymous apply x gate on q_7
Avatar
Anonymous 23-Jul-20 06:20 PM
I have a couple of naive questions about lab4: (1) in the code for a_x_mod15, what do "to_gate()" and "control()" do? (2) why do we initialize target qubits to |1>?
@Anonymous to_gate() converts U to a gate you can later append to another circuit. I guess control() generates the control qubit for that gate
Avatar
Anonymous 23-Jul-20 06:22 PM
@Anonymous I think the |1> is meant in the N notation, where |0> = |0000>, 1=|0001>
Avatar
Anonymous 23-Jul-20 06:23 PM
I have a couple of naive questions about lab4: (1) in the code for a_x_mod15, what do "to_gate()" and "control()" do? (2) why do we initialize target qubits to |1>?
@Anonymous to_gate used to transform a function into a gate
Avatar
Anonymous 23-Jul-20 06:23 PM
@Anonymous I think the |1> is meant in the N notation, where |0> = |0000>, 1=|0001>
@Anonymous Preis That's in fact how I did it (and it worked), but I am wondering why
Avatar
Anonymous 23-Jul-20 06:24 PM
I have a couple of naive questions about lab4: (1) in the code for a_x_mod15, what do "to_gate()" and "control()" do? (2) why do we initialize target qubits to |1>?
@Anonymous to_gate makes sequence of gates as a single box in the circuit; control() makes this gate acting based on another qubit; initial state of the bottom 4 qubits must be an eigen state of a_mod_15
Avatar
Anonymous 23-Jul-20 06:24 PM
Hi all. This is my Shor's Algorithm circuit. It seems good but here says incorrect answer. Could someone help me?
@Anonymous simen use inverse qft instead of qft
Avatar
Anonymous 23-Jul-20 06:25 PM
@Anonymous simen use inverse qft instead of qft
@Anonymous Atallah Thanks. I fixed it changing do_swap=False
👍 1
@Anonymous Atallah Thanks. I fixed it changing do_swap=False. It was =True 😆
Avatar
Anonymous 23-Jul-20 06:27 PM
is it alright?
@Anonymous seems to be true 🙂👍
👍 1
Avatar
Anonymous 23-Jul-20 06:28 PM
is it alright?
@Anonymous Seems good but you can put do_swaps=False before inverse=true if its not work
👍 1
Avatar
Anonymous 23-Jul-20 06:31 PM
anything wrong here?
@Anonymous same as mine
Avatar
Anonymous 23-Jul-20 06:33 PM
@Anonymous is it an eigenvector of the a_x_mod15 operator?
Avatar
Anonymous 23-Jul-20 06:43 PM
@Anonymous no, its a known superposition of the eigenvectors of U. that is what the expansion in the figure in the notebook is showing (edited)
Avatar
Anonymous 23-Jul-20 06:44 PM
anything wrong here?
@Anonymous Have you tried with a_x_mod15(a, 2**q) instead?
Avatar
Anonymous 23-Jul-20 06:47 PM
@Anonymous ohh thanks ... it worked.. earlier i did, then i changed and all got messed up
👍 1
so this is the final output ?
👍 3
😁 1
Avatar
Anonymous 23-Jul-20 06:49 PM
👍
Avatar
Anonymous 23-Jul-20 08:27 PM
why is the M target qubits initialised to state |1> specifically? how is |1> an eigenstate of the unitary operator a^x mod 15 ?
Avatar
Anonymous 23-Jul-20 08:54 PM
why is the M target qubits initialised to state |1> specifically?
@Anonymous I also had this question, and @Anonymous Preis put me on the right track; it is explained in section 2 of Shor's Algorithm in the Qiskit textbook. Note that the explanation is different from the one given in lecture today. (edited)
Avatar
Anonymous 23-Jul-20 08:55 PM
I saw some Shor's algorithm's implementation uses QFT instead of inverse QFT. Should that work too? Since what we need is phase cancellation, QFT and inverse QFT seem to both have that power except the phase angles are reversed.
Avatar
Anonymous 23-Jul-20 09:50 PM
i dont even know how
Avatar
Anonymous 23-Jul-20 09:57 PM
Can someone help me understand what the 2nd argument in given_circuit.append is supposed to be?
Avatar
Anonymous 23-Jul-20 10:04 PM
2nd argument @Anonymous is a list. For its use to apply a_x_mod15 within the modular_exponentiation() function, its a list of the control qubit index followed by the target qubit indicies. So it should look like [0,4,5,6,7] for the first call.
Avatar
Anonymous 23-Jul-20 10:06 PM
@Anonymous How do we know what the list should look like? I'm looking at Abe's lecture notes and I'm not seeing how we know which qubits should be in the list
Avatar
Anonymous 23-Jul-20 10:08 PM
It's the i th measurement qubit followed by the target qubits
[0,4,5,6,7], next call [1,4,5,6,7]...
This matches the circuit at the top of the lab
Avatar
Anonymous 23-Jul-20 10:10 PM
So is it something like i preprended to list(range[m]))?
Avatar
Anonymous 23-Jul-20 10:20 PM
What is the index of the control qubit in the a_x_mod15 function?
Avatar
Anonymous 23-Jul-20 10:21 PM
@Anonymous it is the first one, index 0
Avatar
Anonymous 23-Jul-20 10:22 PM
Thanks!
And how do you assign it to an input qubit when you call it?
Avatar
Anonymous 23-Jul-20 10:24 PM
in the text above the cell it says to use given_circuit.append to use the function
so it would be something like given_circuit.append(a_x_mod15(a,x),qubitlist)
where a is 7, x is the power for exponentiation, and qubitlist is the list of qubits
the first entry in qubitlist is the control while the rest are the targets
Avatar
Anonymous 23-Jul-20 10:37 PM
I'm not sure if my circuit is is wrong or if I made a mistake in the implementation
Avatar
Anonymous 23-Jul-20 10:38 PM
what's the output look like?
Avatar
Anonymous 23-Jul-20 10:38 PM
Avatar
Anonymous 23-Jul-20 10:39 PM
@Anonymous I have the same circuit as you
Different output, but still incorrect
Avatar
Anonymous 23-Jul-20 10:39 PM
The peaks are consistent with every run
Avatar
Anonymous 23-Jul-20 10:39 PM
hmm
are you using the build in QFT
Avatar
Anonymous 23-Jul-20 10:39 PM
I'm not sure if my circuit is is wrong or if I made a mistake in the implementation
@Anonymous apply the not gate at q_7 instead of q_4
Avatar
Anonymous 23-Jul-20 10:39 PM
yeah I am
Avatar
Anonymous 23-Jul-20 10:40 PM
@Anonymous you have to initialize the last qubit
Avatar
Anonymous 23-Jul-20 10:40 PM
The peaks are consistent with every run
@Anonymous you should obtain only four bars in your histogram
Avatar
Anonymous 23-Jul-20 10:40 PM
Avatar
Anonymous 23-Jul-20 10:41 PM
I changed which qubit gets set to 1, but the output is still wonky
Avatar
Anonymous 23-Jul-20 10:41 PM
Yeah, it shouldn't actually matter whether you do the first or last of the auxiliary qubits
Avatar
Anonymous 23-Jul-20 10:41 PM
I changed which qubit gets set to 1, but the output is still wonky
@Anonymous check your iqft code, make sure that you set do_swaps=False
👍 1
Avatar
Anonymous 23-Jul-20 10:42 PM
oh
that might be it
yup
that fixed it
thanks @Anonymous Atallah
Avatar
Anonymous 23-Jul-20 10:44 PM
thanks @Anonymous Atallah
@Anonymous You're welcome 🙂👍
Avatar
Anonymous 23-Jul-20 10:45 PM
Setting do_swaps = False did not change any of my outputs
Avatar
Anonymous 23-Jul-20 10:45 PM
@Anonymous you can use inverseQFT = QFT(n, name = 'iqft', inverse=True)
Avatar
Anonymous 23-Jul-20 10:46 PM
Here's what I have: given_circuit.append(QFT(n, do_swaps=False).inverse(), measurement_qubits)
Avatar
Anonymous 23-Jul-20 10:47 PM
given_circuit.qubits[:n] instead of measurement_qubits
Avatar
Anonymous 23-Jul-20 10:47 PM
n isn't an input to apply_iqft
Avatar
Anonymous 23-Jul-20 10:48 PM
and inverseQFT = QFT(n, name = 'iqft', inverse=True)
n = len(measurement_qubits)
measurement_qubits is a list
well, it's the same thing
maybe the problem is with the QFT function
Avatar
Anonymous 23-Jul-20 10:55 PM
@Anonymous Did you add the X gate on the last qubit? The lab seems to be using big-endian for two groups of qubits
Avatar
Anonymous 23-Jul-20 10:55 PM
I realized I was only applying a hadamard to one qubit. I'm applying it to all 4 measurement qubits now and now I'm only getting odd number results.
@Anonymous No I did not
Avatar
Anonymous 23-Jul-20 10:56 PM
You can try that, and set do_swaps = False for QFT
Avatar
Anonymous 23-Jul-20 10:57 PM
Well now I'm getting a healthy mix of evens and odds but it's still wrong
Avatar
Anonymous 23-Jul-20 10:58 PM
Can I see your circuit?
Avatar
Anonymous 23-Jul-20 10:58 PM
Honestly, I really don't understand what's happening here. I feel like I'm just guessing at changes
Yeah one sec
Avatar
Anonymous 23-Jul-20 10:59 PM
You may have a problem in the modular exponentiation
Avatar
Anonymous 23-Jul-20 11:00 PM
I think if you change the modular exponentiation to fit this diagram it should work:
Avatar
Anonymous 23-Jul-20 11:00 PM
All the boxes look fine, so inside the box must be the problem
Avatar
Anonymous 23-Jul-20 11:00 PM
@Anonymous Wait so it should match the diagram? Someone else told me it should be the reverse of the diagram
Avatar
Anonymous 23-Jul-20 11:01 PM
Yes, it's all about ordering...If you do the reverse, then you need also to do reverse QFT
Avatar
Anonymous 23-Jul-20 11:01 PM
i did this and it works
without do_swaps = False
Avatar
Anonymous 23-Jul-20 11:02 PM
so we do want swaps?
Avatar
Anonymous 23-Jul-20 11:02 PM
Yes, if you do in the reverse order, you don't need to set do_swaps = False. If you do with the order in the diagram, you need to set it to False (edited)
Avatar
Anonymous 23-Jul-20 11:02 PM
I had a recent discussion and it depends on ordering
it seems that the problem is not there
Avatar
Anonymous 23-Jul-20 11:03 PM
Why did IBM decide to make the lab assignments the reverse of the lectures?
Avatar
Anonymous 23-Jul-20 11:03 PM
Why did IBM decide to make the lab assignments the reverse of the lectures?
@Anonymous why not hahah
Avatar
Anonymous 23-Jul-20 11:04 PM
So for QFT in the qiskit.circuit.library, it uses big-endian (ie. |q0 q1 q2 q3..>)
Which means you need to treat q0 as the left-most bit
My circuit is like this, and I set do_swaps = False, it works fine:
Avatar
Anonymous 23-Jul-20 11:07 PM
Yeah that was what my circuit originally looked like
but then when it didn't work I was told the order of exponents needed to be reversed
and I went down a rabbithole
😅 2
Avatar
Anonymous 23-Jul-20 11:09 PM
Could someone help rationalize this:
def a_x_mod15(a, x): if a not in [2,7,8,11,13]: raise ValueError("'a' must be 2,7,8,11 or 13")
specifically why a must be 2, 7, 8, 11, or 13
Avatar
Anonymous 23-Jul-20 11:10 PM
Could someone help rationalize this:
def a_x_mod15(a, x): if a not in [2,7,8,11,13]: raise ValueError("'a' must be 2,7,8,11 or 13")
specifically why a must be 2, 7, 8, 11, or 13
@Anonymous coprimes with 15
Avatar
Anonymous 23-Jul-20 11:10 PM
Oh, yeah 🤦‍♂️ thanks
☺️ 1
Avatar
Anonymous 23-Jul-20 11:13 PM
but then when it didn't work I was told the order of exponents needed to be reversed
@Anonymous If order is reversed, don't change the default do_swaps, else change it if you follow the diagram given in the notebook that's it (edited)
Avatar
Anonymous 23-Jul-20 11:14 PM
@Anonymous Yeah I got it figured out, I'm just a little frustrated that the notation between the lab and the lecture is different
Avatar
Anonymous 23-Jul-20 11:15 PM
@Anonymous Yeah I got it figured out, I'm just a little frustrated that the notation between the lab and the lecture is different
@Anonymous Qiskit website should warn us regarding this reverse ordering of qubits they follow, but nothing as such is specified in their documentation
Avatar
Anonymous 23-Jul-20 11:16 PM
I think it was mentioned at one point, I just wasn't thinking about it in the lab and today's lecture did not (I don't think) mention it
I think it was mentioned on day 1
Avatar
Anonymous 23-Jul-20 11:23 PM
umesh vazirani is live here https://zoom.us/j/98510750335
Zoom is the leader in modern enterprise video communications, with an easy, reliable cloud platform for video and audio conferencing, chat, and webinars across mobile, desktop, and room systems. Zoom Rooms is the original software-based conference room solution used around the...
SPCOM 2020 Website
Avatar
Anonymous 23-Jul-20 11:26 PM
@Anonymous You can check which arguments are control qubits and which are target qubits in the documentation for a gate
Avatar
Anonymous 23-Jul-20 11:26 PM
Thanks.
Avatar
Anonymous 23-Jul-20 11:27 PM
@Anonymous You can check which arguments are control qubits and which are target qubits in the documentation for a gate
@Anonymous ya that's mentioned, I was talking about the swap thing 😅
Avatar
Anonymous 23-Jul-20 11:32 PM
In modular_exponentiation(given_circuit, n, m, a), n and m are just numbers, if I append a_x_mod15() to given_circuit I need to give in 1 control qubit from n, and 4 target qubits from m. If I use a counter to count up from 0 to n and m, I would be passing in [0, 0, 1, 2, 3] and [1, 4, 5, 6, 7] and hence messing up with the names. How do I get around this?
Avatar
Anonymous 23-Jul-20 11:55 PM
Can anyone explain why do they say that we have lab from 1 to 2? I mean do we have lab lectures also?
Avatar
Anonymous 23-Jul-20 11:57 PM
@Anonymous Fitter it is assumed that you can do lab in 1 hour
😅 1
Avatar
Anonymous 23-Jul-20 11:57 PM
Oh okie I am usually asleep cos of my time zone 😅
So I thought I missed out on lectures
Avatar
Anonymous 23-Jul-20 11:58 PM
Yeah we understand. Hence recordings
🤗 1
Avatar
Anonymous 23-Jul-20 11:59 PM
there is a submit error, i assume that servers are overloaded?
Avatar
Anonymous 24-Jul-20 12:08 AM
nvm it works now
Avatar
Anonymous 24-Jul-20 12:30 AM
In modular_exponentiation(given_circuit, n, m, a), n and m are just numbers, if I append a_x_mod15() to given_circuit I need to give in 1 control qubit from n, and 4 target qubits from m. If I use a counter to count up from 0 to n and m, I would be passing in [0, 0, 1, 2, 3] and [1, 4, 5, 6, 7] and hence messing up with the names. How do I get around this?
@Anonymous keep a list of the target qubits handy. then for each control qubit, create a new list with just the control and append the target list to it (edited)
Avatar
Anonymous 24-Jul-20 12:46 AM
I got this error while grading
Avatar
Anonymous 24-Jul-20 12:48 AM
I got this error while grading
@Anonymous just try running again and again until it works... it's a server error
👍 3
Avatar
Anonymous 24-Jul-20 01:01 AM
lab-3 Doubt: We have created a function below called unitary_operator which takes in "three" arguments. But we defined unitary_operator as: def unitary_operator(given_circuit, control_qubit, target_qubit, theta):
Which has 4 arguments
Is the three in the first sentence a typo?
Avatar
Anonymous 24-Jul-20 01:07 AM
@Anonymous If order is reversed, don't change the default do_swaps, else change it if you follow the diagram given in the notebook that's it
@Anonymous About the Qiskit order they have mentioned in the textbook. I suppose.
Avatar
Anonymous 24-Jul-20 01:11 AM
@Anonymous About the Qiskit order they have mentioned in the textbook. I suppose.
@Anonymous thanks a lot, this was really confusing at a time😅
Avatar
Anonymous 24-Jul-20 01:17 AM
@Anonymous thanks a lot, this was really confusing at a time😅
@Anonymous Hey Even i was confused initially about qubits ordering But this from Note : Qiskit textbook helped like a thumb rule to remebered.
Avatar
Anonymous 24-Jul-20 02:02 AM
Hello guys need help with lab3 ? got an value error
Avatar
Anonymous BOT 24-Jul-20 02:02 AM
Your hand has been raised! A mentor will drop in as soon as they are available.
Avatar
Anonymous 24-Jul-20 02:04 AM
* lab4
ops
Avatar
Anonymous 24-Jul-20 02:10 AM
In the lecture we initialized the target qubits to |0>, while in the labs we are initializing them to |1>. How does it work for both?
Avatar
Anonymous 24-Jul-20 02:17 AM
@Anonymous Thanks! but what do I call the qubits when I append them? the n's as 0,1,2,...,n-1 and the m's as n, n+1, ...,n+m-1 .
Avatar
Anonymous 24-Jul-20 02:23 AM
My circuit is like this, and I set do_swaps = False, it works fine:
@Anonymous My circuit is the same as this one. However, I set do_swaps = True and it runs OK. If I set do_swaps = False I get the answer wrong. Does someone know why is this happening? Is it happening only to me?
Avatar
Anonymous 24-Jul-20 02:54 AM
i have a doubt in lab-1.....how do I access classical bits in Quantum circuit....I am trying to write the code without importing quantum and classical registers? Where do I find the attributes of quantum circuit in the documentation?
Avatar
Anonymous 24-Jul-20 02:58 AM
you will have to use C_if
a general form of the code is qc.x(quantum qubit).c_if(clasical qubit, 1)
it says a x gate will be applied if classical qubit has a reading 1
Avatar
Anonymous 24-Jul-20 03:09 AM
Hi @Anonymous , for lab-4 with n=4, m=4, a=7- the answer is not coming right, with n=8 the answer is coming
Avatar
Anonymous 24-Jul-20 03:10 AM
Hi @Anonymous , for lab-4 with n=4, m=4, a=7- the answer is not coming right, with n=8 the answer is coming
@Anonymous Tripathy can you explain whats the error with a = 7
send us the histogram and circuit diagram od a = 7 please
Avatar
Anonymous 24-Jul-20 03:14 AM
Hi @Anonymous - for n=4, m=4, a=7 as given attached the histogram
and guesses are (1, 3) not (3, 5)
Avatar
Anonymous 24-Jul-20 03:16 AM
show the circuit diagram (edited)
Avatar
Anonymous 24-Jul-20 03:17 AM
Avatar
Anonymous 24-Jul-20 03:18 AM
yup i knew it
you have used the reverse order
Avatar
Anonymous 24-Jul-20 03:19 AM
oh
Avatar
Anonymous 24-Jul-20 03:19 AM
this is Abe's circuit try rearranging your cU according to abe's circuit
Avatar
Anonymous 24-Jul-20 03:19 AM
yes got it
but actually in the lab picture they have given it in other order
Avatar
Anonymous 24-Jul-20 03:42 AM
Can anybody please help me that how to give my name in the post summer school project on quantum computation provided by IBM qiskit?
Avatar
Anonymous 24-Jul-20 03:48 AM
since we are applying modular exponentiation, the unitary gates will keep on repeating after 7^4 right
@Anonymous something like this right
Avatar
Anonymous 24-Jul-20 03:49 AM
yup, 7^4 then 7^3 and goes on (edited)
Avatar
Anonymous 24-Jul-20 03:49 AM
@Anonymous wait till next week.
Avatar
Anonymous 24-Jul-20 03:51 AM
i mean to say that 7^8, 7^16, 7^32, all of them will give the same output as 7^4 so tom reduce workload we keep on repeating 7^4 right @Anonymous
since all of 7^4 and beyond give an output 1 with mod 15
i was asking cause the circuit was being submitted as correct even when i didnt apply the modular exponentiation (edited)
Avatar
Anonymous 24-Jul-20 04:05 AM
>
i mean to say that 7^8, 7^16, 7^32, all of them will give the same output as 7^4 so tom reduce workload we keep on repeating 7^4 right @Anonymous @Anonymous Hope this helps
Avatar
Anonymous 24-Jul-20 04:25 AM
Exactly
But need a generalization and not only for the case of 7
Avatar
Anonymous 24-Jul-20 04:32 AM
I’m having trouble with modular exponentiation function, can someone help?
Avatar
Anonymous 24-Jul-20 04:33 AM
does anyone know why we need to convert Z-basis qubits (|0>,|1>) to X-basis (| x>,|->) using Hadamard Gate H all the time? Why can't we just use Z-Basis qubits directly?
Avatar
Anonymous 24-Jul-20 04:36 AM
Is this working alright? It seems alright but I'm getting wrong measurements.
I'm getting "measured 8 and 0" with swaps included in inverse qft
Avatar
Anonymous 24-Jul-20 04:45 AM
@Anonymous check your initialization
Avatar
Anonymous 24-Jul-20 04:46 AM
I applied Hadamard to the first n qubits and X to the m qubits
Avatar
Anonymous 24-Jul-20 04:47 AM
so brain teaser: why does this circuit generate the same measurements as the correct solution? the change is to reverse order of the exp mod gates, replace the inverse QFT with H^4, and remove the swaps.
@Anonymous i think you should only apply x to the very last qubit
Avatar
Anonymous 24-Jul-20 04:48 AM
Your circuit does x only q7 but I have implemented x acting on q4 to q7
with that I get this
it said that the answer was correct but, Abe showed that 3/4 of the time we'd get the right answers.
here only 2 measurements get the correct answer
Avatar
Anonymous 24-Jul-20 04:53 AM
with that I get this
@Anonymous that’s not always true, in 8 if you take value of 2 you won’t get the correct answer
Avatar
Anonymous 24-Jul-20 04:53 AM
I'm confused as to why only 1 of the m measurement qubits is used.
Avatar
Anonymous 24-Jul-20 04:54 AM
It depends on what value of r it takes
Abe showed that too when he was explaining
Avatar
Anonymous 24-Jul-20 04:56 AM
I remember it as if the measured state is not 0 then at least a partial solution is obtained. Maybe I remember it wrong.
Avatar
Anonymous 24-Jul-20 04:57 AM
Ahh yes forgot about that
Avatar
Anonymous 24-Jul-20 04:57 AM
Does that depend on r too?
Avatar
Anonymous 24-Jul-20 04:58 AM
Kind of does, for some values of r you get partial solution, for some you get both the solutions
Avatar
Anonymous 24-Jul-20 04:58 AM
so getting (1,15) for 8 is okay?
Avatar
Anonymous 24-Jul-20 05:00 AM
Can someone hlep with modular exponentiation function?
help*
Avatar
Anonymous 24-Jul-20 05:00 AM
@Anonymous @Anonymous Thanks!
Avatar
Anonymous 24-Jul-20 05:17 AM
@Anonymous sure where are you stuck?
Avatar
Anonymous 24-Jul-20 05:22 AM
I had a question about Lab3. Me and my friend got the same(correct) answer but for slightly different circuits.
The ordering of U1 and H gates on qubit_1 is reversed for the inverse qft section. The overall ordering is slightly different. Can anyone explain this? Is this a qiskit artefact or is there a commutation relationship between H and U1 that is being exploited ? @Anonymous @Anonymous @Anonymous (edited)
Avatar
Anonymous 24-Jul-20 05:28 AM
I'm having a problem with the initialization (i think)...here is my code
qc = given_circuit for q in range(n): qc.h(q) qc.x(m-1+n) #given_circuit.h(n) #given_circuit.x(m+n-1) return qc # given_circuit
I'm trying different codes ... ignore the # part
help please
Avatar
Anonymous 24-Jul-20 05:30 AM
@Anonymous you could simply do "qc.x(m)", why that formula?
Avatar
Anonymous 24-Jul-20 05:30 AM
hold on
Avatar
Anonymous 24-Jul-20 05:30 AM
I'm having a problem with the initialization (i think)...here is my code
@Anonymous Everything looks good although do you need to return qc?
Avatar
Anonymous 24-Jul-20 05:32 AM
two different replies ... I don't think the return qc makes a difference
Avatar
Anonymous 24-Jul-20 05:32 AM
two different replies ... I don't think the return qc makes a difference
@Anonymous That is true. My bad. But other things look the same as what I did (edited)
Avatar
Anonymous 24-Jul-20 05:32 AM
so this part is fine?
Avatar
Anonymous 24-Jul-20 05:33 AM
I simply used this @Anonymous (edited)
given_circuit.h(range(n)) given_circuit.x(n+m-1) (edited)
Avatar
Anonymous 24-Jul-20 05:35 AM
what about this part? does it look OK
qc = given_circuit for q in range(n): qc.append(a_x_mod15(a, 2**q), [q] + [i+n for i in range(m)]) return qc
@Anonymous
Avatar
Anonymous 24-Jul-20 05:36 AM
what about this part? does it look OK
@Anonymous Yep it's okay
Avatar
Anonymous 24-Jul-20 05:37 AM
OK...then this part please
qc = given_circuit gate = QFT(num_qubits=n, approximation_degree=n, inverse=True, insert_barriers=False, name='1qft') qc.append(gate, measurement_qubits)
I added a variable 'n' to the function
@Anonymous
because I used two different codes to try out the results
Avatar
Anonymous 24-Jul-20 05:38 AM
I added a variable 'n' to the function
@Anonymous n=len(measurement_qubits) Did you use something like this?
Avatar
Anonymous 24-Jul-20 05:38 AM
yep
hold on one second @Anonymous please
Avatar
Anonymous 24-Jul-20 05:39 AM
qc = given_circuit gate = QFT(num_qubits=n, approximation_degree=n, inverse=True, insert_barriers=False, name='1qft') qc.append(gate, measurement_qubits)
@Anonymous I built the iqft myself (with help ofc!), so I am not quite sure of the inbuilt QFT documentation. Perhaps someone else could help with that (edited)
hold on one second @Anonymous please
@Anonymous Sure!
Avatar
Anonymous 24-Jul-20 05:41 AM
OK I modified my code to use the len function as follows:
def apply_iqft(given_circuit, measurement_qubits): ### WRITE YOUR CODE BETWEEN THESE LINES - START n = len(measurement_qubits) qc = given_circuit gate = QFT(num_qubits=n, approximation_degree=n, inverse=True, insert_barriers=False, name='1qft') qc.append(gate, measurement_qubits)
ignore the not-so-good coding pattern
Avatar
Anonymous 24-Jul-20 05:41 AM
ignore the not-so-good coding pattern
@Anonymous That's fine 🙂
def apply_iqft(given_circuit, measurement_qubits): ### WRITE YOUR CODE BETWEEN THESE LINES - START n = len(measurement_qubits) qc = given_circuit gate = QFT(num_qubits=n, approximation_degree=n, inverse=True, insert_barriers=False, name='1qft') qc.append(gate, measurement_qubits)
@Anonymous Looks good mate, but as i said i am not sure of the syntax of the QFT function
Avatar
Anonymous 24-Jul-20 05:42 AM
I tried two different ways...neither worked...I also tried this from the Qiskit book
def qft_dagger(n): """n-qubit QFTdagger the first n qubits in circ""" qc = QuantumCircuit(n) # Don't forget the Swaps! for qubit in range(n//2): qc.swap(qubit, n-qubit-1) for j in range(n): for m in range(j): qc.cu1(-np.pi/float(2**(j-m)), m, j) qc.h(j) qc.name = "QFT†" return qc
Avatar
Anonymous 24-Jul-20 05:43 AM
@Anonymous Try using just this maybe?
given_circuit.append(QFT(n).inverse(), measurement_qubits)
As was given in lab3 solution that is
def qft_dagger(n): """n-qubit QFTdagger the first n qubits in circ""" qc = QuantumCircuit(n) # Don't forget the Swaps! for qubit in range(n//2): qc.swap(qubit, n-qubit-1) for j in range(n): for m in range(j): qc.cu1(-np.pi/float(2**(j-m)), m, j) qc.h(j) qc.name = "QFT†" return qc
@Anonymous This is from the notebook yes
given_circuit.append(QFT(n).inverse(), measurement_qubits)
Try this @Anonymous
Avatar
Anonymous 24-Jul-20 05:46 AM
that's the only argument in the function? @Anonymous
Avatar
Anonymous 24-Jul-20 05:47 AM
yes
Just use this one line in the function
you might need to do a swap though
but see if this works
@Anonymous This should work if the previous one doesnt produce the right answers given_circuit.append(QFT(n,do_swaps = True).inverse(), measurement_qubits) (edited)
Avatar
Anonymous 24-Jul-20 05:51 AM
Hi all, one question about the submission of the lab work. There is a point that says that we should use the email address which we used for the registration. Does anybody know which registration? I used different email addresses to register for my ibmId and the summer school. Thanks for your help 😄
Avatar
Anonymous 24-Jul-20 05:52 AM
>
Hi all, one question about the submission of the lab work. There is a point that says that we should use the email address which we used for the registration. Does anybody know which registration? I used different email addresses to register for my ibmId and the summer school. Thanks for your help 😄 @Anonymous The summer school
Avatar
Anonymous 24-Jul-20 05:52 AM
I think it means the one you used for the summer school
Avatar
Anonymous 24-Jul-20 05:52 AM
@Anonymous okey fine, thank you
👍 1
Avatar
Anonymous 24-Jul-20 05:52 AM
@Anonymous thank you Rahul...still not working...not sure why
Avatar
Anonymous 24-Jul-20 05:54 AM
@Anonymous thank you Rahul...still not working...not sure why
@Anonymous What is the error now?
Avatar
Anonymous 24-Jul-20 05:55 AM
no error but the numbers aren't right
I get this image
and these measures
Measured 6 Measured 1 Measured 15 Measured 0 Measured 13 Measured 9 Measured 5 Measured 2 Measured 3 Measured 11 Measured 7 Measured 14 Measured 10
Avatar
Anonymous 24-Jul-20 05:56 AM
@Anonymous dm me your ipynb
Avatar
Anonymous 24-Jul-20 05:59 AM
@Anonymous done
Avatar
Anonymous 24-Jul-20 06:27 AM
Hey guys! Made this cool GIF to make the Qiskit Logo with the help of Grover's Algorithm and Qsphere . visualization tool. Hope you all like it 😁 @Anonymous @Anonymous
qiskitsmart 9
Avatar
Anonymous 24-Jul-20 06:29 AM
I get this image
@Anonymous Check your cU
you used the reversed order
Avatar
Anonymous 24-Jul-20 06:34 AM
Pinned a message.
@Anonymous Vaishnav Thank you. It's nice
😋 1
👍 1
Avatar
Anonymous 24-Jul-20 06:35 AM
Hi, I see a lot of people confused with the ordering of the qubits when they're going from the qiskit textbook to Abe's lectures and when using the QFT from circuit library. As far as I understand this is a small problem that hopefully will be solved. In short, it goes like this: - In many textbooks and the one Abe used in the lectures it assumes that the state |x1x2x3....xn> has the qubit |x1> on the top of the circuit (taking that you draw the circuit horizontally) and the qubit |xn> at the bottom. So all of the circuits seen in Abe's lecture follow this convention (and also in the some textbooks like Nielsen & Chuang); - Qiskit's convention on the other hand has it reversed: |x1x2x3....xn> has the qubit |x1> on the bottom of the circuit and the qubit |xn> at the top and this one is correctly used on Qiskit's textbook. With this in mind, you will notice that the QFT from the circuit library uses the first convention on top of a Qiskit circuit, that's why many of you are getting reversed results. In the labs this exchanged order is accounted for when you see the [::-1] which reversed the order of the output results. https://discordapp.com/channels/729706617951485954/729709878943154246/735534738235719740 https://github.com/ajavadia/qiskit-terra/tree/qft-little-endian (edited)
Python software development kit for writing quantum computing experiments, programs, and applications - ajavadia/qiskit-terra
👍 3
Avatar
Anonymous 24-Jul-20 06:37 AM
Hi, I see a lot of people confused with the ordering of the qubits when they're going from the qiskit textbook to Abe's lectures and when using the QFT from circuit library. As far as I understand this is a small problem that hopefully will be solved. In short, it goes like this: - In many textbooks and the one Abe used in the lectures it assumes that the state |x1x2x3....xn> has the qubit |x1> on the top of the circuit (taking that you draw the circuit horizontally) and the qubit |xn> at the bottom. So all of the circuits seen in Abe's lecture follow this convention (and also in the some textbooks like Nielsen & Chuang); - Qiskit's convention on the other hand has it reversed: |x1x2x3....xn> has the qubit |x1> on the bottom of the circuit and the qubit |xn> at the top and this one is correctly used on Qiskit's textbook.
>
With this in mind, you will notice that the QFT from the circuit library uses the first convention on top of a Qiskit circuit, that's why many of you are getting reversed results. In the labs this exchanged order is accounted for when you see the [::-1] which reversed the order of the output results.
> > @Anonymous @Anonymous please pin this too (edited)
Python software development kit for writing quantum computing experiments, programs, and applications - ajavadia/qiskit-terra
Avatar
Anonymous 24-Jul-20 06:39 AM
Pinned a message.
Avatar
Anonymous 24-Jul-20 06:40 AM
Hi, I see a lot of people confused with the ordering of the qubits when they're going from the qiskit textbook to Abe's lectures and when using the QFT from circuit library. As far as I understand this is a small problem that hopefully will be solved. In short, it goes like this: - In many textbooks and the one Abe used in the lectures it assumes that the state |x1x2x3....xn> has the qubit |x1> on the top of the circuit (taking that you draw the circuit horizontally) and the qubit |xn> at the bottom. So all of the circuits seen in Abe's lecture follow this convention (and also in the some textbooks like Nielsen & Chuang); - Qiskit's convention on the other hand has it reversed: |x1x2x3....xn> has the qubit |x1> on the bottom of the circuit and the qubit |xn> at the top and this one is correctly used on Qiskit's textbook.
>
With this in mind, you will notice that the QFT from the circuit library uses the first convention on top of a Qiskit circuit, that's why many of you are getting reversed results. In the labs this exchanged order is accounted for when you see the [::-1] which reversed the order of the output results.
> > @Anonymous thanks a lot friend. will refer to this and ask people to read this if they are stuck witt the reverse mapping
Python software development kit for writing quantum computing experiments, programs, and applications - ajavadia/qiskit-terra
👍 2
Avatar
Anonymous 24-Jul-20 06:42 AM
no problem, happy to help. This has me stumped many times too👍
👍 1
Avatar
Anonymous 24-Jul-20 06:42 AM
Hi, I see a lot of people confused with the ordering of the qubits when they're going from the qiskit textbook to Abe's lectures and when using the QFT from circuit library. As far as I understand this is a small problem that hopefully will be solved. In short, it goes like this: - In many textbooks and the one Abe used in the lectures it assumes that the state |x1x2x3....xn> has the qubit |x1> on the top of the circuit (taking that you draw the circuit horizontally) and the qubit |xn> at the bottom. So all of the circuits seen in Abe's lecture follow this convention (and also in the some textbooks like Nielsen & Chuang); - Qiskit's convention on the other hand has it reversed: |x1x2x3....xn> has the qubit |x1> on the bottom of the circuit and the qubit |xn> at the top and this one is correctly used on Qiskit's textbook.
>
With this in mind, you will notice that the QFT from the circuit library uses the first convention on top of a Qiskit circuit, that's why many of you are getting reversed results. In the labs this exchanged order is accounted for when you see the [::-1] which reversed the order of the output results.
> > @Anonymous I don't think it's like that... If you make a normal circuit and say you put H gate on first qubit ( qc.h(0) ), then it gets added to the top of the circuit and not at the bottom. The confusion that everyone is getting into is not the ordering of the qubits, but to figure out which operation is a quantum operation and which one is classical (python) operation. When we write the SWAP gate ( qc.swap(q1, q2) ), its a quantum operation. But as you mentioned the example of [::-1], that is a classical operation used in python to reverse the list, string, etc.
Python software development kit for writing quantum computing experiments, programs, and applications - ajavadia/qiskit-terra
👍 2
Avatar
Anonymous 24-Jul-20 06:44 AM
yes, and it is, I just mean the order of your notation
Avatar
Anonymous 24-Jul-20 06:45 AM
Can anybody help me that how the normalization factor is coming as 1/2.....? I'm not getting that...the marked portion in the picture....
Avatar
Anonymous 24-Jul-20 06:45 AM
yes, and it is, I just mean the order of your notation
@Anonymous The order of notation is same in qiskit as in Mike and Ike and other books
Avatar
Anonymous 24-Jul-20 06:46 AM
It's not, in nielsen it assumes this "|x1x2x3....xn> has the qubit |x1> on the top of the circuit (taking that you draw the circuit horizontally) and the qubit |xn> at the bottom", while in qiskit you have " |x1x2x3....xn> has the qubit |x1> on the bottom of the circuit and the qubit |xn> at the top"
in fact you can check the QFT circuit on both textbooks and check this reverse order
Avatar
Anonymous 24-Jul-20 06:47 AM
Can anybody help me that how the normalization factor is coming as 1/2.....? I'm not getting that...the marked portion in the picture....
@Anonymous the normalization factor is 1/2 because there's a sum of 4 terms in the first qubit. So 4 * (1/2)² = 1
Avatar
Anonymous 24-Jul-20 06:47 AM
Can anybody help me that how the normalization factor is coming as 1/2.....? I'm not getting that...the marked portion in the picture....
@Anonymous its nothing but 1/srt(4) do the general normalization for 4 stated with equal probability and you will see where 1/2 comes from (edited)
Avatar
Anonymous 24-Jul-20 06:48 AM
Here you have the one in Nielsen
Avatar
Anonymous 24-Jul-20 06:48 AM
Ok
Avatar
Anonymous 24-Jul-20 06:49 AM
It's not, in nielsen it assumes this "|x1x2x3....xn> has the qubit |x1> on the top of the circuit (taking that you draw the circuit horizontally) and the qubit |xn> at the bottom", while in qiskit you have " |x1x2x3....xn> has the qubit |x1> on the bottom of the circuit and the qubit |xn> at the top"
@Anonymous Please execute and check the following code and check yourself....
from qiskit import * qc = QuantumCircuit(4) qc.h(0) qc.draw('text')
Avatar
Anonymous 24-Jul-20 06:49 AM
and here you see the qiskit notebook version
@Anonymous Vaishnav I know, if you execute that it will add a hadamard on the first qubit, that's not the point I'm trying to make
compare both circuits I sent
Avatar
Anonymous 24-Jul-20 06:50 AM
and here you see the qiskit notebook version
@Anonymous the qubit numbering doesn't matter here... You can start from anywhere (top or bottom) the final thing remains the same
compare both circuits I sent
@Anonymous yeah I understand your point... But as I said if the final rotations are the same, then the order or orientation of the circuit doesn't matter.
Avatar
Anonymous 24-Jul-20 06:53 AM
the physics and the algorithm run the same, but your outcome comes reversed. In fact, look at lab3 the outcome you get on the histogram is 00001, but you have to reverse it in order to have 10000 and thus recover theta=0.5
👍 1
Avatar
Anonymous 24-Jul-20 06:53 AM
@Anonymous Vaishnav the states are normalized states only ..|3>,|4>...all of these states are normalized beforehand.....and if we talk about the normalization we need after the measurement to calculate the post measurement state ,then there the 1/4 term has to be multiplied, why are we doing only 1/√4 .....
Avatar
Anonymous 24-Jul-20 06:55 AM
'The amount of qubit/clbit arguments does not match the gate expectation.' I'm getting this error while running the cell with the main function. any idea why?
Avatar
Anonymous 24-Jul-20 07:00 AM
i am getting an error like this pl help
Avatar
Anonymous 24-Jul-20 07:03 AM
i am getting an error like this pl help
@Anonymous import numpy as np(or whatever you wish) .....and then use np.pi in place of pi
Avatar
Anonymous 24-Jul-20 07:07 AM
'The amount of qubit/clbit arguments does not match the gate expectation.' I'm getting this error while running the cell with the main function. any idea why?
@Anonymous Joy @Anonymous
Avatar
Anonymous 24-Jul-20 07:18 AM
you input qubits are less then the gate requires
Avatar
Anonymous 24-Jul-20 07:19 AM
@Anonymous Vaishnav the states are normalized states only ..|3>,|4>...all of these states are normalized beforehand.....and if we talk about the normalization we need after the measurement to calculate the post measurement state ,then there the 1/4 term has to be multiplied, why are we doing only 1/√4 .....
@Anonymous after measurement is it 1/4 because it gets converted into probability so it's squared. But as amplitude, we have to multiply with 1/2 as 1/√4 = 1/2
Avatar
Anonymous 24-Jul-20 07:20 AM
Ok
In the lab 4 which control gate do we have to use?
To implement the modular function?
Avatar
Anonymous 24-Jul-20 07:25 AM
use the pre defined a_x_mod15(a, x) function
its the cU(mod)
Avatar
Anonymous 24-Jul-20 07:25 AM
'The amount of qubit/clbit arguments does not match the gate expectation.' I'm getting this error while running the cell with the main function. any idea why?
@Anonymous Joy nvm solved this
Avatar
Anonymous 24-Jul-20 07:29 AM
@Anonymous Thank you...I figured out why it was reversed
With the help of Rahul
Avatar
Anonymous 24-Jul-20 07:45 AM
happy to help
Avatar
Anonymous 24-Jul-20 07:57 AM
Guys I know, it might be out of topic from the current discussion, but I think we can have a good discussion over it! The question which I had in my mind is, just the way we have Quantum Equivalent of Classical Electronic Gates, is it possible to build Quantum Equivalent of Microprocessors(like 8051) or more complex Electronic circuits which are build from the really basic gates that we learnt on out First Day of this summer school! It'll be great if maximum of us participate and discuss, even if a straight answer is a NO, even a hypothetical analysis of the question will be really fruitful for the Community as a whole and who knows we might come up with something new ;-)
qiskitsmart 1
👍 2
Avatar
Anonymous 24-Jul-20 08:15 AM
In principle I don't see why not. If a microprocessor in just a bunch of gates clambered together so as to perform a certain overall functionality, so in principle I don't see why not. But with quantum computation its important not to get swallowed into media's quantum hype. In a far future we may deal with those problems, but take into account the sheer amount of engineering just to accomplish one barely functional qubit on a heavily controlled environment, take as examples IBM's superconducting qubits and the example given by Abe yesterday. In short, in principle I don't see why not, but its far from feasable in the near future
👍 1
Also, classically we have the great advantage of boolean logic and karnaugh maps to aid us in circuit design, here we are a bit adrift (edited)
Avatar
Anonymous 24-Jul-20 08:16 AM
But I think we can even improve them to use the advantages of quantum theories
So in theory we can create an improved version of 8051
Avatar
Anonymous 24-Jul-20 08:35 AM
Is the Day4 Crowdcast link out yet?
Avatar
Anonymous 24-Jul-20 08:36 AM
if you mean day 5, it's the same as day 4 with the 4 replaced by 5
😃 1
Avatar
Anonymous 24-Jul-20 08:36 AM
I'm sorry Day5
Avatar
Anonymous 24-Jul-20 09:45 AM
Variational Quantum Linear Solver section of the book has no Link for downloading the Jupyter Book
Avatar
Anonymous 24-Jul-20 10:35 AM
We think initially we must think of implementing classical gates using quantum gates...
Avatar
Anonymous 24-Jul-20 11:06 AM
@Anonymous that means if I want to make use of the library's QFT AND make sure to obey Qiskit's convention, I have to take the do_swaps = False Option? (edited)
qiskitblack 1
Avatar
Anonymous 24-Jul-20 11:08 AM
I guess so yes, but there's nothing like experimenting
give it a shot and check
Avatar
Anonymous 24-Jul-20 11:10 AM
I did
worked too
btw. when you showed the Nielsen Chuang circuit above in the chat you should maybe add, that they omitted the swaps deliberately
👍 1
qiskitblack 1
Avatar
Anonymous 24-Jul-20 11:13 AM
"We model this here in a simple way, using so-called depolarizing noise. The effect of this will be, with probabilty pgate ,to replace the state of any qubit with a completely random state. For two qubit gates, it is applied independently to each qubit. The other form of noise is that for measurement. This simply flips between a 0 to a 1 and vice-versa immediately before measurement with probability pmeas ." Is a qubit entering in a gate equivalent to measure it from a physical perspective?
Avatar
Anonymous 24-Jul-20 12:18 PM
does anyone know why we need to convert Z-basis qubits (|0>,|1>) to X-basis (| x>,|->) using Hadamard Gate H all the time? Why can't we just use Z-Basis qubits directly?
@Anonymous hadamard gates let the qubits interfere together which make use of the quantum effects, at the of the circuit we apply hadamard gates again to remove interference
Avatar
Anonymous 24-Jul-20 12:29 PM
Just a thought, why the ordering of qubits in Qiskit has been made in reverse order? I mean, is there any specific reason to do so, or its just some technical aspects behind the scenes??
Avatar
Anonymous 24-Jul-20 12:31 PM
I have one question ... when we create a quantumcircuit(q,c) ... aren't we automatically creating a quantum register with q qubits and classical register with c bits?
Avatar
Anonymous BOT 24-Jul-20 12:46 PM
Avatar
Anonymous 24-Jul-20 12:57 PM
i’m looking forward to actually implementing quantum error correction in the lab... i wish we saw more of the code today but itll be fine nevertheless
👍 1
Avatar
Anonymous 24-Jul-20 01:04 PM
@Anonymous It seems that it was a little rushed because of the technical issues. It would be great if James could possibly add on what else he was going to add in the lecture all that he missed out so that we can benefit from all of his material. I really do not care if it goes on for another hour as he was doing a nice job of explaining it and I personally would benefit from the material on Quantum Error Correction
👍 2
Avatar
Anonymous 24-Jul-20 01:14 PM
@Anonymous agreed! ill see what i can do with his notes but i wish we had more elaboration on the ending material
Avatar
Anonymous 24-Jul-20 01:21 PM
We still have his ppt to go over ourselves
Avatar
Anonymous 24-Jul-20 01:26 PM
@Anonymous It seems that it was a little rushed because of the technical issues. It would be great if James could possibly add on what else he was going to add in the lecture all that he missed out so that we can benefit from all of his material. I really do not care if it goes on for another hour as he was doing a nice job of explaining it and I personally would benefit from the material on Quantum Error Correction
@Anonymous Fully agree! Given the weekend, it might give him some time too.... and also include a simple Qiskit demo for the same... I know this is being greedy, so I would only ask as a request. But the payoff would be enormous!
Avatar
Anonymous 24-Jul-20 01:32 PM
is there a link to lab 5 today ?
Avatar
Anonymous 24-Jul-20 01:32 PM
@Anonymous not yet I think
Avatar
Anonymous 24-Jul-20 01:33 PM
@Anonymous you would see it in #lab-exercises
Avatar
Anonymous 24-Jul-20 01:35 PM
Thanks both- I've had a good look at instructions & announcements above and I don't see a link or lab to download- do you know whether we are having a lab for this section ?
Avatar
Anonymous 24-Jul-20 01:46 PM
@Anonymous It would be out in some time (edited)
Avatar
Anonymous 24-Jul-20 02:02 PM
Avatar
Anonymous 24-Jul-20 02:21 PM
Quite a longer lab video today, which is great for me since I really enjoyed QEC
Avatar
Anonymous 24-Jul-20 02:38 PM
Done lab5😋
👍 2
Happy to help
Avatar
Anonymous 24-Jul-20 02:42 PM
a very particular hard problem indeed
Avatar
Anonymous 24-Jul-20 02:49 PM
Happy to help
@Anonymous Aziz Did you use the command IBMQ.save_account for the error in your image?
Avatar
Anonymous 24-Jul-20 02:49 PM
Yes you have to do that
Avatar
Anonymous 24-Jul-20 02:54 PM
@Anonymous Aziz Did you use the command IBMQ.save_account for the error in your image?
@Anonymous Maldonado Romo No I didn't
I ran, IBMQ.load_account() ; same as it is
Avatar
Anonymous 24-Jul-20 02:57 PM
45 min of Lab 5 video ☺
🥳 1
Avatar
Anonymous 24-Jul-20 02:59 PM
i can't see the error map for fake_tokyo? it gives me the error IndexError: list index out of range
did you guys manage to get around this or did you just make do with the values under the multi-qubit gates tab?
👍 1
Avatar
Anonymous 24-Jul-20 03:02 PM
i can't see the error map for fake_tokyo? it gives me the error IndexError: list index out of range
@Anonymous Same problem here....
Avatar
Anonymous 24-Jul-20 03:04 PM
@Anonymous help please! 🙂
Avatar
Anonymous 24-Jul-20 03:04 PM
done
Avatar
Anonymous 24-Jul-20 03:05 PM
done, it was fun
i can't see the error map for fake_tokyo? it gives me the error IndexError: list index out of range
@Anonymous can you see the backend above the error? I had the same error (edited)
Avatar
Anonymous 24-Jul-20 03:10 PM
Yes, every other tab loads for me, apart from the "error map" one
Avatar
Anonymous 24-Jul-20 03:11 PM
i can't see the error map for fake_tokyo? it gives me the error IndexError: list index out of range
@Anonymous Having the same issue here
Avatar
Anonymous 24-Jul-20 03:11 PM
Any solution?
Avatar
Anonymous 24-Jul-20 03:11 PM
Yes, every other tab loads for me, apart from the "error map" one
@Anonymous And this code doesn't show you the backend, only error? (from qiskit.test.mock import FakeTokyo backend = FakeTokyo() backend)
For me it shows the error and the backend
Avatar
Anonymous 24-Jul-20 03:11 PM
Also, this appears
👍 3
Avatar
Anonymous 24-Jul-20 03:13 PM
So it still kinda work
Avatar
Anonymous 24-Jul-20 03:13 PM
Mine is a bit prettier:
👍 1
Avatar
Anonymous 24-Jul-20 03:13 PM
@Anonymous i got the same thing
Avatar
Anonymous 24-Jul-20 03:14 PM
Also, this appears
@Anonymous And this is right below the black frame
Avatar
Anonymous 24-Jul-20 03:14 PM
Mine is a bit prettier:
@Anonymous Wow, you are lucky 🙂
😋 1
Avatar
Anonymous 24-Jul-20 03:16 PM
"if you find it hard, just give it to your parents and they'll probably do it for you" - Gotta love James's humor
simulate 2
Avatar
Anonymous 24-Jul-20 03:17 PM
"if you find it hard, just give it to your parents and they'll probably do it for you" - Gotta love James's humor
@Anonymous Yeah, hilarious
Avatar
Anonymous 24-Jul-20 03:17 PM
"if you find it hard, just give it to your parents and they'll probably do it for you" - Gotta love James's humor
@Anonymous Haha !! James has a great sense of humour
Avatar
Anonymous 24-Jul-20 03:17 PM
@Anonymous i got the same thing
@Anonymous I just got to minute 41 in the video and James said that this error is not uncommon, since it's a backend that's not much used. It's a bug, really
😅 1
Avatar
Anonymous 24-Jul-20 03:18 PM
Ohhh...
@Anonymous how did you mamage to do the lab without the error map then? Did you just use the multi-qubit gates section?
Avatar
Anonymous 24-Jul-20 03:20 PM
James is right, though. It really feels like one of those magazine puzzles. I'll even draw it on a piece of paper to find a solution lol
😂 1
Avatar
Anonymous 24-Jul-20 03:20 PM
@Anonymous how did you mamage to do the lab without the error map then? Did you just use the multi-qubit gates section?
@Anonymous The list index out of range error doesn't affect on the other cells, so just change the List, and that's it
Avatar
Anonymous 24-Jul-20 03:23 PM
I really lost it at the end of the video when James tells us to go play Animal Crossing during the weekend. Such a lovely person
👍 1
Avatar
Anonymous 24-Jul-20 03:23 PM
you just need the connection map
Avatar
Anonymous 24-Jul-20 03:25 PM
you just need the connection map
@Anonymous Preis Yup👍
Avatar
Anonymous 24-Jul-20 03:26 PM
Ohhh i thought we would need the error map to know which cx gates are most error prone (so we know which to avoid)
Avatar
Anonymous 24-Jul-20 03:27 PM
Anyone got this error?
👍 2
Avatar
Anonymous 24-Jul-20 03:32 PM
Ohhh i thought we would need the error map to know which cx gates are most error prone (so we know which to avoid)
@Anonymous That would certainly be the best approach. But avoiding the use of CX gates for swaps already helps a lot
Avatar
Anonymous 24-Jul-20 03:32 PM
Yeh, i've done it now haha
👍 3
Thanks!
👍 1
Avatar
Anonymous 24-Jul-20 03:38 PM
👍 1
Avatar
Anonymous 24-Jul-20 03:39 PM
yeeeeiiiiiiii
Avatar
Anonymous 24-Jul-20 03:41 PM
Such a nice lab. Not much code to do, but I certainly have learned a whole lot with James's examples in the lab.
Avatar
Anonymous 24-Jul-20 04:02 PM
I'm sorry, should we change the d variable in today's lab? Where d is the repetitions tokyo should do (edited)
Avatar
Anonymous 24-Jul-20 04:08 PM
I'm sorry, should we change the d variable in today's lab? Where d is the repetitions tokyo should do
@Anonymous Just change the line list...
Avatar
Anonymous 24-Jul-20 04:09 PM
Understood, I tried to change d too but the circuit wasn't the one desired haha
😄 1
Avatar
Anonymous 24-Jul-20 04:43 PM
Hint: applyin' old lovable graph theory can help you find the solution quite easily
Avatar
Anonymous 24-Jul-20 05:04 PM
Job done !!!
Avatar
Anonymous 24-Jul-20 05:04 PM
Guys! I am a little behind. Having trouble with the initialize function for lab 4
Would someone like to help?
Avatar
Anonymous 24-Jul-20 05:07 PM
A university quantum algorithms/computation course supplement based on Qiskit
@Anonymous
Avatar
Anonymous 24-Jul-20 05:09 PM
Thanks @Anonymous . I cannot understand where it says
qc.x(3+n_count)
Avatar
Anonymous 24-Jul-20 05:11 PM
adding X after 3 gap
X in green color
Avatar
Anonymous 24-Jul-20 05:11 PM
I see!
That's how we change it into |1>, if I am not mistaken
Avatar
Anonymous 24-Jul-20 05:12 PM
That's how we change it into |1>, if I am not mistaken
@Anonymous That's correct
👍🏻 1
Avatar
Anonymous 24-Jul-20 05:12 PM
@Anonymous this is X job
That's how we change it into |1>, if I am not mistaken
@Anonymous
👍🏻 1
Avatar
Anonymous 24-Jul-20 05:21 PM
Hi, Is not clear for my the lab 5, I think the code is define the line variable? however I believe that something miss ... some clue?
Avatar
Anonymous 24-Jul-20 05:23 PM
I just modified line=[ ...] and it worked
following neighbours nodes
Avatar
Anonymous 24-Jul-20 05:32 PM
Hi everyone, my name is Pam, and I currently do research in experimental high energy physics :) Some of you might be interested in this talk on quantum machine learning by Sau Lan Wu. Sau Lan is a prominent member of the high energy physics community. She is generally credited with discovering the gluon. It’s at 9:30 EST on Tuesday (sady during IBM's lecture 😦 ). She will present at ICHEP, registration found at https://ichep2020.org/
😱 3
👍 3
Avatar
Anonymous 24-Jul-20 05:32 PM
@Anonymous thanks!! I check it.
Avatar
Anonymous 24-Jul-20 05:55 PM
Im putting in the token of my IBMQ account and this error is the result
what am I doing wrong here?
Avatar
Anonymous 24-Jul-20 05:58 PM
Use IBMQ.save_account('TOKEN')
Avatar
Anonymous 24-Jul-20 06:00 PM
Im putting in the token of my IBMQ account and this error is the result
@Anonymous Dont forget parenthesis IBMQ.load_account()
Avatar
Anonymous 24-Jul-20 06:03 PM
wrote it in perenthesis @Anonymous
Avatar
Anonymous 24-Jul-20 06:03 PM
Look at the queue (edited)
Avatar
Anonymous 24-Jul-20 06:04 PM
today's lab is super easy
Avatar
Anonymous 24-Jul-20 06:04 PM
when I use IMBQ.save_account("") it works, but the provider statement makes issues then
Avatar
Anonymous 24-Jul-20 06:04 PM
When
Avatar
Anonymous 24-Jul-20 06:04 PM
to be honest it was kind of hard to understand the lecture (maybe because i got tired today) but the lab was good
Avatar
Anonymous 24-Jul-20 06:04 PM
wrote it in perenthesis @Anonymous
@Anonymous it didn't look like you used parenthesis in the picture you uploaded
when I use IMBQ.save_account("") it works, but the provider statement makes issues then
@Anonymous you only use save.account when you are setting up your environment with the token or when you want to replace it with another token. Then you don't use save account anymore
Avatar
Anonymous 24-Jul-20 06:43 PM
I'm getting this: UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 6162: character maps to <undefined>
Anyone got this error?
@Anonymous Fitter did you solve this?
Avatar
Anonymous 24-Jul-20 08:41 PM
In cell 19, how do we load in our ibmq credentials?
Avatar
Anonymous 24-Jul-20 08:42 PM
@Anonymous by adding cell
Avatar
Anonymous 24-Jul-20 08:46 PM
I'm not sure I follow?
I thought we needed to define a provider but it seems like that's already done in the cell
Avatar
Anonymous 24-Jul-20 08:53 PM
Nevermind! fixed it (edited)
Avatar
Anonymous 24-Jul-20 09:44 PM
Should I concern myself with the last cell in the lab?
Avatar
Anonymous 24-Jul-20 10:07 PM
is there class tomorrow?
or until monday
Avatar
Anonymous 24-Jul-20 10:10 PM
is there class tomorrow?
@Anonymous nah 😦 we start again on monday
Avatar
Anonymous 24-Jul-20 11:12 PM
ok! thank you 🙂
Avatar
Anonymous 25-Jul-20 12:56 AM
@Anonymous the weekend is holiday , no tutorials
👍 1
Avatar
Anonymous 25-Jul-20 01:01 AM
Anyone can help please in lab5?
Avatar
Anonymous 25-Jul-20 01:07 AM
sure @Anonymous
where are you stuck
Avatar
Anonymous 25-Jul-20 01:56 AM
In the intial noise model example, it is said that the depolarizing noise is applied only to cx gates, but there does not seem to be any mention of the cx gate in the code applying the error. Why is that?
Avatar
Anonymous 25-Jul-20 02:59 AM
IBMQ.enable_account("paste your API after creating an account at IBM QE")
Avatar
Anonymous 25-Jul-20 03:24 AM
@Anonymous Fitter did you solve this?
@Anonymous U in the grader we need to add encoding as utf8
Avatar
Anonymous 25-Jul-20 04:17 AM
IBMQ.enable_account("paste your API after creating an account at IBM QE")
@Anonymous can anyone explain this a bit more in detail? I have no idea how the loading of IBMQ account works
Avatar
Anonymous 25-Jul-20 04:49 AM
@Anonymous go to Search Results quantum-computing.ibm.com, and make a free account . Then go to "My account" section of the page and click "copy token", Then paste it here : IBMQ.enable_account("paste your API after creating an account at IBM QE") in your jupyter notebook. That's it.
Avatar
Anonymous 25-Jul-20 05:01 AM
need help with lab 4
i am getting the following circuit but the answer is wrong
this is the histogram
Avatar
Anonymous 25-Jul-20 05:02 AM
@Anonymous go to Search Results quantum-computing.ibm.com, and make a free account . Then go to "My account" section of the page and click "copy token", Then paste it here : IBMQ.enable_account("paste your API after creating an account at IBM QE") in your jupyter notebook. That's it.
@Anonymous Thanks a ton!!!
Avatar
Anonymous 25-Jul-20 05:08 AM
@Anonymous Your cU(mod) are in reversed order
Avatar
Anonymous 25-Jul-20 05:08 AM
Shor's algo with direct connection to ibm
This tutorial will show you how to implement Shor's algorithm on IBM quantum computers in Python and Qiskit.
using the TOKEN
@Anonymous i think we all had this isse :)...check your iqft (that was the problem in my case) or just follow Codie's hints
Avatar
Anonymous 25-Jul-20 05:09 AM
so this part is wrong?
Avatar
Anonymous 25-Jul-20 05:10 AM
yes
try (n-1-i)
Avatar
Anonymous 25-Jul-20 05:11 AM
did this but got 'duplicate qubit arguments' error
Avatar
Anonymous 25-Jul-20 05:12 AM
@Anonymous wouldn't @Anonymous using i to cycle through the range(n) and range(m) cause a problem? why not use two variables?
Avatar
Anonymous 25-Jul-20 05:12 AM
did this but got 'duplicate qubit arguments' error
@Anonymous not the range
changer the power
2^(i) replaced by 2^(n-1-i)
Avatar
Anonymous 25-Jul-20 05:14 AM
it worked
Avatar
Anonymous 25-Jul-20 05:14 AM
leave the range to be same, and use a different variable for the range(m) use "j" if you want
Avatar
Anonymous 25-Jul-20 05:15 AM
right...use the origianl code with a different variable
Avatar
Anonymous 25-Jul-20 05:15 AM
Now i understand why it worked cos we are going through the index in reverse order
thanks a lot for the help!!!
Avatar
Anonymous 25-Jul-20 05:16 AM
Now i understand why it worked cos we are going through the index in reverse order
@Anonymous your answer was correct the first time but was on reversed order. Nothing so significant happned in the new code (edited)
Avatar
Anonymous 25-Jul-20 05:17 AM
@Anonymous for clarity this is how your code should be like (observe the variables q and i)...
qc = given_circuit for q in range(n): qc.append(a_x_mod15(a, 2**q), [q] + [i+n for i in range(m)])
you don't need qc cause you're using the given_circuit directly
Avatar
Anonymous 25-Jul-20 05:18 AM
yes my code was incrementing the powers whilst now they are decrementing
Avatar
Anonymous 25-Jul-20 05:20 AM
do we have demo notebooks from lecture 3?
Avatar
Anonymous 25-Jul-20 05:24 AM
no we dont have that
Avatar
Anonymous 25-Jul-20 05:24 AM
nope!
Avatar
Anonymous 25-Jul-20 06:07 AM
The ordering of U1 and H gates on qubit_1 is reversed for the inverse qft section. The overall ordering is slightly different. Can anyone explain this? Is this a qiskit artefact or is there a commutation relationship between H and U1 that is being exploited ? @Anonymous @Anonymous @Anonymous
@Anonymous @Anonymous Have you got an answer to this yet? (edited)
Avatar
Anonymous 25-Jul-20 06:23 AM
Hi everyone, my name is Pam, and I currently do research in experimental high energy physics :)
>
Some of you might be interested in this talk on quantum machine learning by Sau Lan Wu. Sau Lan is a prominent member of the high energy physics community. She is generally credited with discovering the gluon. It’s at 9:30 EST on Tuesday (sady during IBM's lecture 😦 ). She will present at ICHEP, registration found at https://ichep2020.org/
@Anonymous This is really exciting! I had the honor to attend her talk about the Higgs Bosons discovery. I really admire her and her works. I didn’t know she is also leading the collaboration between CERN and IBM Quantum.
😍 1
@Anonymous The registration is closed. Is there any way to register now?
Avatar
Anonymous 25-Jul-20 07:16 AM
the last cell is giving error !!!
Avatar
Anonymous 25-Jul-20 07:18 AM
Avatar
Anonymous 25-Jul-20 07:27 AM
@Anonymous * i done it but still error*
Avatar
Anonymous 25-Jul-20 07:45 AM
For those interested in the mathematics of qm, try Mathematics of Classical and Quantum Physics by Byron and Fuller...this book is a mathematical symphony
👍 3
There is also A Course in Modern Mathematical Physics by Peter Szekeres but this one has a much broader and in-depth coverage of the mathematics of general relativity which is (in my opinion) much harder to understand than qm math
I like the Fuller/Byron book so much I had to write a review about it LOL
Avatar
Anonymous 25-Jul-20 08:40 AM
@Anonymous * i done it but still error*
@Anonymous Miqdad Khan did you reimported the file?
Avatar
Anonymous 25-Jul-20 09:21 AM
@Anonymous The registration is closed. Is there any way to register now?
@Anonymous Huang I was wondering the same thing @Anonymous
Avatar
Anonymous 25-Jul-20 09:37 AM
This might be a basic question, but I wanna know what does 0 in "Qubit(QuantumRegister(8, 'code_qubit'), 0): 6" mean in lab 5? Can someone explain this part. (edited)
Avatar
Anonymous 25-Jul-20 09:43 AM
Lecture by Professor Brad Osgood for the Electrical Engineering course, The Fourier Transforms and its Applications (EE 261). Professor Osgood provides an overview of the course, then begins lecturing on Fourier series. The Fourier transform is a tool for solving physical ...
👍 1
qiskitters...don't miss these awesome lectures
Avatar
Anonymous 25-Jul-20 11:03 AM
Would someone please give me a hand, i've been stuck in these questions for hours. In lecture 2, and in the block two of the code of Deutsh-Jozsa algorithm, we use many cnot gate to realize an balanced oracle function. My questions are: 1. why do we need an extra qubit here? 2.how do i understand (or what happens) when i apply many cnot gate to the same target qubit? 3.i thought that the control qubit would not change its value after applying a cnot gate, how is the probability of state |11111....1> possibily be 1?? I think I understand how physically Deutsh-Jozsa algorithm works, but i really have no idea what is the qiskit code doing.
Avatar
Anonymous 25-Jul-20 12:04 PM
@Anonymous 1- The extra qubit you mention I suppose its the ancilla qubit for the oracle. The extra qubit its there because the oracle not only needs to be reversible, and defining it that way ensures that, but you also defined it such that its main function was to act on the measurement qubits (https://docs.microsoft.com/en-us/quantum/concepts/oracles?view=qsharp-preview) 2-I'm not entirely sure what you mean here, maybe you can explain a bit more. In short a cnot is a 2 qubit gate. And if you apply a cnot to the same target with the same control twice it does nothing, if you apply a cnot to the same target but with different controls you may get something interesting. In fact, this last one is used on repetition codes as shown in yesterday's lecture by James; 3-Again I don't quite understand what you mean here, maybe you could explain a bit more?
Learn how to work with and define quantum oracles, black box operations that are used as input to another algorithm.
Avatar
Anonymous 25-Jul-20 12:06 PM
@Anonymous Huang I was wondering the same thing @Anonymous
@Anonymous Hey, yep, I didn't realize registration closed by the time I posted it. If ICHEP announces something, I will let you know. They mentioned off-line viewing, so I'll update you all 🙂
👍 1
Avatar
Anonymous 25-Jul-20 12:33 PM
for which day lab people were facing issues with submission file?
Avatar
Anonymous 25-Jul-20 12:45 PM
@Anonymous Hussain Mostly lab2, but I saw people having issues with the other labs as well.
Avatar
Anonymous 25-Jul-20 12:46 PM
for which day lab people were facing issues with submission file?
@Anonymous Hussain lab 2 -lab 3 (edited)
Avatar
Anonymous 25-Jul-20 12:51 PM
@Anonymous Hey, yep, I didn't realize registration closed by the time I posted it. If ICHEP announces something, I will let you know. They mentioned off-line viewing, so I'll update you all 🙂
@Anonymous thanks man
Avatar
Anonymous 25-Jul-20 01:15 PM
any one know how to load account in lab 5?
It's giving me an error whenever I try to assign provider and load my IBMQ account
Nvm, we have to use IBMQ.enable_account() for anyone else wondering
Avatar
Anonymous 25-Jul-20 02:07 PM
@Anonymous Miqdad Khan did you reimported the file?
@Anonymous yes i reimport that
Avatar
Anonymous 25-Jul-20 02:09 PM
@Anonymous you need an IBM quantum experience account. and use the save_account function with the api key a an argument
Avatar
Anonymous 25-Jul-20 02:16 PM
It's giving me an error whenever I try to assign provider and load my IBMQ account
@Anonymous from qiskit import IBMQ IBMQ.save_account('Your IBMQ Account API Token Here') generated token IBMQ.load_account() # After loading credentials we query the backends
try this
Avatar
Anonymous 25-Jul-20 02:26 PM
@Anonymous Miqdad Khan I don't think you need the save account part
from qiskit import IBMQ
IBMQ.enable_account('ENTER API TOKEN HERE') # Enter your API token
provider = IBMQ.get_provider(hub='ibm-q')
Avatar
Anonymous 25-Jul-20 02:29 PM
Hi! Does someone know how to create a controlled gate from an arbitrary gate? I am trying this https://qiskit.org/documentation/stubs/qiskit.extensions.UnitaryGate.control.html#qiskit.extensions.UnitaryGate.control but it does not work. Thanks! (edited)
Avatar
Anonymous 25-Jul-20 02:50 PM
I was just doing lab 4, and my output was coming wrong apparently due to not using do_swaps=False. Can someone explain why this was happening? Because the swaps are only supposed to reverse the ordering of qubits right. So out of 0, 4, 8, 12, 0 is 0000 4 is 0010 8 is 0001 12 is 0011 But even if we reverse the qubits, the outcomes should be 0000, 0100, 1000, 1100. Why was I getting other answers then (more than 4 answers, like 7, 11, 13). Only the order should be reversed right?
Avatar
Anonymous 25-Jul-20 02:57 PM
Avatar
Anonymous 25-Jul-20 03:06 PM
@Anonymous Miqdad Khan I don't think you need the save account part
@Anonymous for me save account works that's why I suggest that if enable_account works that is also good
Avatar
Anonymous 25-Jul-20 03:21 PM
In lab 5, what is the relationship between the line and the number of CX gates in the transpiled circuit?
Avatar
Anonymous 25-Jul-20 03:37 PM
I was just doing lab 4, and my output was coming wrong apparently due to not using do_swaps=False. Can someone explain why this was happening? Because the swaps are only supposed to reverse the ordering of qubits right. So out of 0, 4, 8, 12, 0 is 0000 4 is 0010 8 is 0001 12 is 0011
>
But even if we reverse the qubits, the outcomes should be 0000, 0100, 1000, 1100. Why was I getting other answers then (more than 4 answers, like 7, 11, 13). Only the order should be reversed right?
@Anonymous Garg I would suggest you to implement inverse QFT by yourself and without doing the reverse swaps, the way qiskit has done it, and check what answers are u getting, and whether they are similar to the qiskit inverse QFT without swaps!!!
In lab 5, what is the relationship between the line and the number of CX gates in the transpiled circuit?
@Anonymous Atallah as the number of nodes in a line increases, the number of cx gates also increase, check the lab video, you will get the intuition
👍 1
Avatar
Anonymous 25-Jul-20 03:49 PM
Can anyone tell me how to implement the built-in inverse QFT function ??
How to write the code and the argumenta for it ??
Avatar
Anonymous 25-Jul-20 03:57 PM
A university quantum algorithms/computation course supplement based on Qiskit
Avatar
Anonymous 25-Jul-20 04:28 PM
Thanks a lot @Anonymous
Got the right answer
👍 1
Avatar
Anonymous 25-Jul-20 04:42 PM
Hi! Does someone know how to create a controlled gate from an arbitrary gate? I am trying this https://qiskit.org/documentation/stubs/qiskit.extensions.UnitaryGate.control.html#qiskit.extensions.UnitaryGate.control but it does not work. Thanks!
@Anonymous Cruz We actually already used this in lab 4, see the definition of a_x_mod15
Avatar
Anonymous 25-Jul-20 04:53 PM
Can anyone tell me how to implement the built-in inverse QFT function ??
@Anonymous As usual, there are various ways. Here is one way ``given_circuit.append(QFT(n).inverse(),measurement_qubits)''
Avatar
Anonymous 25-Jul-20 04:57 PM
Thanks
Avatar
Anonymous 25-Jul-20 05:08 PM
@Anonymous should we get the exact value of theta in lab 3 ??
The given value is 0.5 while I got 0.44
Avatar
Anonymous 25-Jul-20 05:10 PM
@Anonymous should we get the exact value of theta in lab 3 ??
@Anonymous Yes; I got 0.5. Did you remember about the 2*pi? (edited)
Avatar
Anonymous 25-Jul-20 05:11 PM
Alright
Avatar
Anonymous 25-Jul-20 05:19 PM
Can anyone tell me where did I go wrong ??
Avatar
Anonymous 25-Jul-20 05:24 PM
First part is correct. I am not sure about the inverse QFT. You could use the function iqft with iqft = QFT(n).inverse() (edited)
Avatar
Anonymous 25-Jul-20 05:25 PM
Ok... actually I tried to do it 'the hard way'
Let me check by using the inverse QFT function
Avatar
Anonymous 25-Jul-20 05:25 PM
thats alright you can learn even more then
👍 1
Avatar
Anonymous 25-Jul-20 05:27 PM
Did you remember about the 2*pi?
Avatar
Anonymous 25-Jul-20 05:27 PM
@Anonymous Use swap after iqft and fix your second swap The second swap is wrong. The correct is swap(1,3)
Avatar
Anonymous 25-Jul-20 05:28 PM
Yeah I did @Anonymous
👍 1
Let me try @Anonymous simen
@Anonymous @Anonymous I got the answer using the inverse QFT built-in function
Thanks a lot for the help
@Anonymous simen your method worked to...thanks a lot
Avatar
Anonymous 25-Jul-20 05:35 PM
@Anonymous 🎉
Avatar
Anonymous 25-Jul-20 05:59 PM
Hello. Whats the difference between qubit statevector |q_0> and a qubit's general state |q> ?
Avatar
Anonymous 25-Jul-20 06:04 PM
@Anonymous It’s simply a choice of variable names. If you have only one qubit to deal with, you can call it |q>. If you have multiple qubits, it’s convenient to name them with subscripts: |q_0>, |q_1>, |q_2>, ..., |q_(n-2)>, |q_(n-1)>. (edited)
😃 1
Avatar
Anonymous 25-Jul-20 06:05 PM
how do we access the lab instructions even after the event has concluded?
Does the crowdcast not expire? or is there a way to download the videos?
Avatar
Anonymous 25-Jul-20 06:08 PM
@Anonymous You can download the lectures from YouTube at https://www.youtube.com/playlist?list=PLOFEBzvs-VvqPzAH4jwcHbV_rJz2_l9B6. You can also download the labs from the #lab-exercises channel. (edited)
Avatar
Anonymous 25-Jul-20 06:09 PM
@Anonymous You can download the lectures from YouTube at https://www.youtube.com/playlist?list=PLOFEBzvs-VvqPzAH4jwcHbV_rJz2_l9B6. You can also download the labs from the #lab-exercises channel.
@Anonymous Thanks! Appreciate the help,. I should have been clearer, I was asking about the Lab Instruction videos
Avatar
Anonymous 25-Jul-20 06:11 PM
Does the statement "quantum computing is built on the fact that atoms can exist in different states and places at the same time" include superposition and entanglement, or does it explain superposition only?
Avatar
Anonymous 25-Jul-20 06:13 PM
I think that statement informally describes superposition, but it doesn’t explicitly refer to entanglement. (edited)
Avatar
Anonymous 25-Jul-20 06:15 PM
🎊 5
simulate 1
Avatar
Anonymous 25-Jul-20 06:15 PM
It would take some elaboration on the relationship between different atoms to include entanglement
😃 1
Avatar
Anonymous 25-Jul-20 06:18 PM
@Anonymous but i thought superposition is only about atoms existing in different states, not places.
Avatar
Anonymous 25-Jul-20 06:26 PM
There are many physical properties which can be used as states for quantum systems. This includes spatial locations, time of arrival, and presence or absence of a particle, atom, or molecule. You can find an incomplete list of physical qubit implementations here: https://en.wikipedia.org/wiki/Qubit#Physical_implementations (edited)
😃 1
Avatar
Anonymous 25-Jul-20 06:37 PM
Thanks
Is the use of quantum computers in quantum chemistry is for modelling new medicine? Or are quantum chemistry and modelling of new medicine different?
Avatar
Anonymous 25-Jul-20 09:35 PM
Hello. I want to share some simple functions that could be usefull when visualizating vectors or matrices when using Qiskit
Avatar
Anonymous 25-Jul-20 10:07 PM
i’m curious if anyone knows of a general implementation of shor’s algorithm in qiskit from this paper: https://arxiv.org/pdf/quant-ph/0205095.pdf
i find a lot of the U-gates are mod for a specific prime number (15 for example) and i was hoping to find a general U-gate
cU1_gate 1
Avatar
Anonymous 25-Jul-20 10:47 PM
I got this errror in lab 5
Have no clue about this
Avatar
Anonymous 25-Jul-20 10:53 PM
I got this errror in lab 5
@Anonymous you'll need to put you API token into save_account (edited)
Avatar
Anonymous 25-Jul-20 10:54 PM
API token what is that? Sorry I don't know about it (edited)
Avatar
Anonymous 25-Jul-20 10:55 PM
this API token allows to run on IBM's quantum devices 🙂
Avatar
Anonymous 25-Jul-20 10:55 PM
From where do i get it
Avatar
Anonymous 25-Jul-20 10:55 PM
Program real quantum systems with the leading quantum cloud application.
you'll need to create an account
once you get it, the page should look like this
then click on the person on the top right corner and click my account (edited)
it will look like this, and the you can copy that token into save_account 🙂
Avatar
Anonymous 25-Jul-20 11:02 PM
Now I get this
@Anonymous try using single quotes around the token. I believe it's a string (edited)
Avatar
Anonymous 25-Jul-20 11:04 PM
Now I get this
@Anonymous keep the token in double quotes inside save_account function
Avatar
Anonymous 25-Jul-20 11:05 PM
Still I get the same error
Avatar
Anonymous 25-Jul-20 11:05 PM
Now i get this
@Anonymous you need to add the overwrite parameter
as it says in there
overwrite=True
Avatar
Anonymous 25-Jul-20 11:06 PM
Where to put that
Avatar
Anonymous 25-Jul-20 11:06 PM
After the string token
Avatar
Anonymous 25-Jul-20 11:06 PM
In the save account?
Avatar
Anonymous 25-Jul-20 11:06 PM
Yes
Avatar
Anonymous 25-Jul-20 11:06 PM
yes
after the last quote add a comma
and then the parameter with its value = True
and then close parenthesis
Avatar
Anonymous 25-Jul-20 11:07 PM
Ok thanks
I got it (edited)
Avatar
Anonymous 25-Jul-20 11:07 PM
yw
Avatar
Anonymous 25-Jul-20 11:10 PM
please help to solve this error in submission
Avatar
Anonymous 25-Jul-20 11:45 PM
Are you using optimization_level=3 in transpile?
Avatar
Anonymous 25-Jul-20 11:52 PM
@Anonymous The images you have posted that regards your API key should be deleted. The api key is what ties the local qiskit installation to your IBM Q account. This is like a password which grants you use to the access to the IBM Q systems. if you share this other users can misuse this key to get more access to the systems than what have already been allocated. For your security please delete those screenshots and regenerate your key. 😉 (edited)
Avatar
Anonymous 25-Jul-20 11:59 PM
@Anonymous The images you have posted that regards your API key should be deleted. The api key is what ties the local qiskit installation to your IBM Q account. This is like a password which grants you use to the access to the IBM Q systems. if you share this other users can misuse this key to get more access to the systems than what have already been allocated. For your security please delete those screenshots and regenerate your key. 😉
@Anonymous ok ok. But I already regenerated😂
👍 2
Avatar
Anonymous 26-Jul-20 02:03 AM
guide me please
Avatar
Anonymous 26-Jul-20 02:14 AM
guide me please
@Anonymous Haodudin Nurkifli Hi, you have to select a path where all nodes in the tokyo graph are connected (i.e. a line going through all points) (edited)
Avatar
Anonymous 26-Jul-20 02:23 AM
@Anonymous do you mean like this line = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19],
?
Avatar
Anonymous 26-Jul-20 02:24 AM
yeah so rearrange that vector in a way where you can draw a path between all nodes
Avatar
Anonymous 26-Jul-20 02:25 AM
line =[[[0, 1], [0, 5], [1, 0], [1, 2], [1, 6], [2, 1], [2, 3], [2, 6], [3, 2], [3, 8], [3, 9], [4, 8], [4, 9], [5, 0], [5, 6], [5, 10], [5, 11], [6, 1], [6, 2], [6, 5], [6, 7], [6, 10], [6, 11], [7, 1], [7, 6], [7, 8], [7, 12], [7, 13], [8, 3], [8, 4], [8, 7], [8, 9], [8, 12], [8, 13], [9, 3], [9, 4], [9, 8], [10, 5], [10, 6], [10, 11], [10, 15], [11, 5], [11, 6], [11, 10], [11, 12], [11, 16], [11, 17], [12, 7], [12, 8], [12, 11], [12, 13], [12, 16], [13, 7], [13, 8], [13, 12], [13, 14], [13, 18], [13, 19], [14, 13], [14, 18], [14, 19], [15, 10], [15, 16], [16, 11], [16, 12], [16, 15], [16, 17], [17, 11], [17, 16], [18, 13], [18, 14], [19, 13], [19, 14]]]
?
Avatar
Anonymous 26-Jul-20 02:26 AM
@Anonymous do you mean like this line = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19],
@Anonymous Haodudin Nurkifli rearrange the numbers here
Avatar
Anonymous 26-Jul-20 02:45 AM
@Anonymous please show real code
Avatar
Anonymous 26-Jul-20 02:51 AM
@Anonymous Haodudin Nurkifli Think of it as if you were connecting dots / cells, that you can only mention or cross once : )
If you use this [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19] you will see that this is not possible* for the kind of assortment falsetokyo is (edited)
👍 1
Avatar
Anonymous 26-Jul-20 02:59 AM
line = [0,1,2,3,9,4,8,7,6,5,10,15,16,17,11,12,13,18,14,19]
@Anonymous Thanks
👍 1
@Anonymous Morillo Thanks
Avatar
Anonymous 26-Jul-20 03:03 AM
Woo hoo! 🥳
Avatar
Anonymous 26-Jul-20 03:04 AM
😍 1
Happy to help!
Avatar
Anonymous 26-Jul-20 03:04 AM
hi, can someone please help me fix this error?
Avatar
Anonymous 26-Jul-20 03:05 AM
hi, can someone please help me fix this error?
@Anonymous krishnan make sure to run the previous code block cell :)
that's where
answer
is defined
Avatar
Anonymous 26-Jul-20 03:06 AM
@Anonymous sure, thank you.
Avatar
Anonymous 26-Jul-20 03:10 AM
Can anyone tell me the intuition behind lab 5, James told us to get intuition beyond the puzzle solving in the lab. I am not clear
Avatar
Anonymous 26-Jul-20 04:44 AM
Can anyone tell me the intuition behind lab 5, James told us to get intuition beyond the puzzle solving in the lab. I am not clear
@Anonymous R I was really thinking about it as a puzzle. So I tried to move qubits in the line to get the cx's. I don't know if this help but I needed to try 3 or 4 times to get to the right answer. (edited)
Avatar
Anonymous 26-Jul-20 04:47 AM
Does anybody know, what the sense of the marked line from lab 4 is? I do not know, why we are doing that. Thank you for your help 🙂
Avatar
Anonymous 26-Jul-20 04:50 AM
its the list of qubits you want your a_x_mod15 circuit to be appended on
👆 1
Avatar
Anonymous 26-Jul-20 04:52 AM
@Anonymous thank you for your answer, that makes sense. But why x + list? Sorry for the question, I am just a little bit confused 🙂
Avatar
Anonymous 26-Jul-20 04:54 AM
see you have used x in range (n) lets take x = 0 now if you the circuit we want control at q(x) for that and last m qubits for the mod to act on . so we need x and [4,5,6,7]
the command [x]+ list(range(n,m+n)) dose that
👍 1
Avatar
Anonymous 26-Jul-20 04:55 AM
(adding lists in Python concatenates them)
👍 1
Avatar
Anonymous 26-Jul-20 04:56 AM
Ah of course, I got it. Thank you a lot for the support 😄
Avatar
Anonymous 26-Jul-20 04:59 AM
@Anonymous your profile pic is a like to your github ?
Avatar
Anonymous 26-Jul-20 05:00 AM
Yes, it is
Avatar
Anonymous 26-Jul-20 05:01 AM
I wanna try it too
will make one 🙂
😎 2
Avatar
Anonymous 26-Jul-20 05:06 AM
can someone help me to understand "do_swap=false" ???
why does the "thing" should be inserted?
its from lab4 solution
Avatar
Anonymous 26-Jul-20 05:10 AM
it should not be there if you have done the cU(mod) in the correct order (edited)
See if you have the order correct
👍 2
Avatar
Anonymous 26-Jul-20 05:15 AM
I have still one question. Why do we apply an X Gate just on the last qubit and not on the other target qubits to? From Lab 4.
Avatar
Anonymous 26-Jul-20 05:16 AM
the |psi> initialized stated Abe has been talking about in the lecture
that's |1> = |1000>
so we only need to apply it on last qubit
Avatar
Anonymous 26-Jul-20 05:18 AM
Okey. I am just confused because in the explanation stays: "We will also set the target qubits to |1⟩"
Avatar
Anonymous 26-Jul-20 05:26 AM
@Anonymous wow...thanks a lot!!!
Avatar
Anonymous 26-Jul-20 05:32 AM
Okey. I am just confused because in the explanation stays: "We will also set the target qubits to |1⟩"
@Anonymous in lecture? or Lab ipython file
Avatar
Anonymous 26-Jul-20 05:34 AM
From the lab file. 🙂
Avatar
Anonymous 26-Jul-20 05:40 AM
It says that we set the target to |1>. ya i got it but whats the problem
👍 1
Avatar
Anonymous 26-Jul-20 05:42 AM
Why do we apply the X Gate just one time and not for the other target bits too?
Avatar
Anonymous 26-Jul-20 05:44 AM
it will work if you mark them as well
just do it and check
Avatar
Anonymous 26-Jul-20 05:46 AM
Okey fine, that means it is up to me if I am applying these X gates on every target bit or just on the last one? Thank you a lot for your help and support @Anonymous 🙂
Avatar
Anonymous 26-Jul-20 06:06 AM
Do we have to submit anything other than Lab question's solution?
Avatar
Anonymous 26-Jul-20 06:08 AM
For lab4, I got 0 and 8 with equal probability (no 4 or 12). My circuit matches the diagram, and I’ve checked the order of the qubits and the do_swap flag. Has anyone else gotten this result?
@ Codie have you seen anyone else with this particular issue? (edited)
It turns out I was initializing the target qubits to |1111> instead of |0001> or |1000>
Avatar
Anonymous 26-Jul-20 06:19 AM
It turns out I was initializing the target qubits to |1111> instead of |0001> or |1000>
@Anonymous dude when i looked into it. I got confused and now im doing all the theory again from scratch. Now i have some doubt and wanna ask
I'm an idiot
Avatar
Anonymous 26-Jul-20 06:20 AM
It's very easy to get the qubits mixed up. I'm currently experimenting to see which target qubit initializations work.
Avatar
Anonymous 26-Jul-20 06:22 AM
@Anonymous it works for every initialization except |0> and |15>
Avatar
Anonymous 26-Jul-20 06:22 AM
That makes sense
Avatar
Anonymous 26-Jul-20 06:23 AM
okay i got it now
0 wont work and 15 mod 15 is zero so that wont work as well
@Anonymous you are good at this dude.
Avatar
Anonymous 26-Jul-20 06:26 AM
Huh, I wonder why there's no measurement of the target qubits in the lab
Avatar
Anonymous 26-Jul-20 06:27 AM
because we don't need them to find the order.
they have some piece of information as well but we need that for now
Avatar
Anonymous 26-Jul-20 06:28 AM
but we're not using a phase operator, are we?
Avatar
Anonymous 26-Jul-20 06:28 AM
no we are not
Avatar
Anonymous 26-Jul-20 06:28 AM
hmm
then I don't see how the circuit in lab4 works
The control qubits can only be affected through phase operations or measurements on entangled qubits
and we have neither of those here
Avatar
Anonymous 26-Jul-20 06:31 AM
me too i got the part abe was talking about the circuit but im still not able to interpret how the a_x_mod15(a, x) works (edited)
Avatar
Anonymous 26-Jul-20 06:31 AM
maybe it's because the other four qubits have to collapse/decohere at the end of the circuit anyway (edited)
but that feels like a pretty weak argument
Avatar
Anonymous 26-Jul-20 06:34 AM
yup will look for an answer and get to you once i figure out
tell me too if you find something about it
Avatar
Anonymous 26-Jul-20 06:38 AM
Resolution for IBMQ access for following Lab 5 code will be appreciated. Thanks. Lab 5: Transpiling for real devices Following code when executed with token value copied pasted from IBM Q Experience is not working: from qiskit import IBMQ IBMQ.save_account('MY_API_TOKEN') # Enter your API token IBMQ.load_account() provider = IBMQ.get_provider(hub='ibm-q') Generates following warnings & errors: configrc.store_credentials:WARNING:2020-07-26 06:33:58,505: Credentials already present. Set overwrite=True to overwrite. HTTPError: 401 Client Error: Unauthorized for url: https://auth.quantum-computing.ibm.com/api/users/loginWithToken RequestsApiError: '401 Client Error: Unauthorized for url: https://auth.quantum-computing.ibm.com/api/users/loginWithToken. Login failed., Error code: 3446.'
Avatar
Anonymous 26-Jul-20 06:40 AM
IBMQ.save_account('API', overwrite=True)
this worked for me try this
Avatar
Anonymous 26-Jul-20 06:41 AM
IBMQ.save_account('API', overwrite=True)
@Anonymous Thank you!!
Avatar
Anonymous 26-Jul-20 06:46 AM
@Anonymous I think I figured it out: x and w are entangled, but each of them still has only 4 possibilities. It's still a superposition of 16 states, but 4 of them have x=0, 4 have x=4, etc. The states with the same x value can't interfere with each other because they have different w values. The inverse QFT still works from a Fourier perspective since it works for individual w and this is just a linear combination (and they don't interfere), and also Abe already showed that the math works out before taking the measurement.
TL:DR; The measurement isn't needed because x is still in one of four states, and those states don't destructively interfere because they're entangled with w.
Avatar
Anonymous 26-Jul-20 06:52 AM
okay i got what you are trying to say
@Anonymous thanks mate
👍 1
Avatar
Anonymous 26-Jul-20 06:55 AM
I'm glad I went down this path. Shor's algorithm is even more fascinating than I already thought quantumidea
Avatar
Anonymous 26-Jul-20 08:56 AM
Hello @Anonymous , I saw your answers in the qiskit channel and want to ask if you can maybe help. Do you now why we apply an X Gate just on the last qubit and not on the other target qubits to? From Lab 4.
@Anonymous It works for most states, not just |0001>. I talked with Codie about it (see his response here https://discord.com/channels/729706617951485954/732633353471393853/736891516848570368). It has to be something other than 0 mod 15 so that we get a periodic pattern like 1, 2, 4, 8, 1, 2, ... rather than 0, 0, 0, 0, ... . (edited)
Avatar
Anonymous 26-Jul-20 08:58 AM
@Anonymous thank you :)
👍 1
Avatar
Anonymous 26-Jul-20 09:00 AM
I found it out the hard way because I thought it meant to set all of the qubits to 1, but that makes it 15, which doesn’t work. If you set it to |00...1>, it should work even for larger numbers.
Avatar
Anonymous 26-Jul-20 09:19 AM
How do you convert a state vector to a Bloch vector in order to plot it on the Bloch Sphere in qiskit?
Avatar
Anonymous 26-Jul-20 09:22 AM
@Anonymous 1- The extra qubit you mention I suppose its the ancilla qubit for the oracle. The extra qubit its there because the oracle not only needs to be reversible, and defining it that way ensures that, but you also defined it such that its main function was to act on the measurement qubits 2-I'm not entirely sure what you mean here, maybe you can explain a bit more. In short a cnot is a 2 qubit gate. And if you apply a cnot to the same target with the same control twice it does nothing, if you apply a cnot to the same target but with different controls you may get something interesting. In fact, this last one is used on repetition codes as shown in yesterday's lecture by James; 3-Again I don't quite understand what you mean here, maybe you could explain a bit more?
@Anonymous the 'interesting thing' you mention in your second argument is exactly the thing that i don't understand (applying a cnot to the same target but with different controls). i hope it would be explained more in James's lecture (i'm still watching lecture 3). Thank you for your reply 😀 (edited)
👍 1
Avatar
Anonymous 26-Jul-20 09:23 AM
@Anonymous Check out plot_bloch_multivector
It automatically converts to Bloch vectors and can handle multiple qubits
Avatar
Anonymous 26-Jul-20 10:04 AM
@Anonymous thanks!
Also can we extract or display certain qubits from the state vector of a system of qubits?
Like I want to see what are the last two qubits after I apply a circuit to 5 qubits
Avatar
Anonymous 26-Jul-20 10:47 AM
Hi, this is regarding Lab2
For hours together my jupyter window seems to be showing
But not proceeding to submit
Anyone faced a similar issue / I tried everything - restarting kernel/restarting windows
Avatar
Anonymous 26-Jul-20 10:48 AM
You will have to run all the cells together again, and wait for it to grade properly
Avatar
Anonymous 26-Jul-20 10:48 AM
oh, does it take a very long time
Avatar
Anonymous 26-Jul-20 10:48 AM
Are you by any chance rerunning only the last cell?
If so, you'll most likely get this.
Avatar
Anonymous 26-Jul-20 10:48 AM
in large number of reattempts- i might have- not sure
ok the solution is to start from the beginning?
Also, when i run them it sort of toggles back (clearing the output but does not run again )
Avatar
Anonymous 26-Jul-20 10:49 AM
Okay, save it, on checkpoint, open it again/ refresh it. Rerun it from the beginning.
Avatar
Anonymous 26-Jul-20 10:49 AM
any suggestions would be greatly of help
Avatar
Anonymous 26-Jul-20 10:49 AM
Give run all cells. That would help!
Avatar
Anonymous 26-Jul-20 10:50 AM
ok thanks!
Avatar
Anonymous 26-Jul-20 10:50 AM
Yep! Anytime :)
Avatar
Anonymous 26-Jul-20 10:52 AM
How long should i typically wait before trying to run all cells again
any reasonable time limit ?
Avatar
Anonymous 26-Jul-20 10:53 AM
There isn't any. It'll probably complete in two minutes
Avatar
Anonymous 26-Jul-20 10:54 AM
hi.. does anyone know what is the cumulative score for the labs? I thought all labs are just pass and fail as I never received any grade upon submission.. does anyone know the details of this?
Avatar
Anonymous 26-Jul-20 10:55 AM
hi.. does anyone know what is the cumulative score for the labs? I thought all labs are just pass and fail as I never received any grade upon submission.. does anyone know the details of this?
@Anonymous Elmeligy I don't think there is any cumulative score. Refer this: https://discordapp.com/channels/729706617951485954/729709899260362832/735193431529488516
Avatar
Anonymous 26-Jul-20 10:57 AM
it's sent in the summer school guide
Avatar
Anonymous 26-Jul-20 10:58 AM
@Anonymous Elmeligy where did you got this
Avatar
Anonymous 26-Jul-20 10:58 AM
this is the summer school guide :"D
Avatar
Anonymous 26-Jul-20 10:59 AM
@Anonymous Elmeligy I don't understand the question the cumulative grade problem is same with me
Avatar
Anonymous 26-Jul-20 11:00 AM
This screenshot is taken from the lab guide page six on the bottom right corner
😕 1
Avatar
Anonymous 26-Jul-20 11:00 AM
@Anonymous Elmeligy I too didn't recieved cumulative grade is it same with you
Avatar
Anonymous 26-Jul-20 11:01 AM
@Anonymous Asfaw can you help clarify this please? 🙂 (edited)
Avatar
Anonymous 26-Jul-20 11:07 AM
@Anonymous Elmeligy yes I talked with a person grades are necessary for certificate
Avatar
Anonymous 26-Jul-20 11:08 AM
@Anonymous yes but do you receive a grade upon submission? and if I don't what should I do? (edited)
👍 1
Avatar
Anonymous 26-Jul-20 11:13 AM
Flagging for Abe 👆 we should have an answer soon
👍 1
Avatar
Anonymous 26-Jul-20 11:20 AM
Hi @Anonymous Now i get this message-
Avatar
Anonymous 26-Jul-20 11:20 AM
Hi! Thank you for flagging @Anonymous Kirschner 🙂 Cumulative score simply means how many of the labs you got correct. So far there have been 5 lab exercises. By the end, you will have gone through 9, and so 65% means getting >5 of them right. On one of the upcoming days, you will have two exercises in the same lab, so each one will account for 0.5 of that lab. I hope that clarifies things 🙂 Should probably tag @Anonymous Elmeligy here So just to quickly clarify -- cumulative simply means the sum of all your correct exercise submissions. There's no partial grading of each exercise that you need to worry about. (edited)
👍 8
Avatar
Anonymous 26-Jul-20 11:21 AM
Oh thanks okk
Avatar
Anonymous 26-Jul-20 11:23 AM
Pinned a message.
Avatar
Anonymous 26-Jul-20 11:24 AM
@Anonymous Asfaw Thank you for responsiveness and clarification :))
💯 3
👍 1
Avatar
Anonymous 26-Jul-20 11:34 AM
@Anonymous Kirschner Thanks for the support Suzie
Avatar
Anonymous 26-Jul-20 11:35 AM
👍 1
Avatar
Anonymous 26-Jul-20 11:35 AM
@Anonymous Kirschner 😂😂😇👌
Avatar
Anonymous 26-Jul-20 11:41 AM
Hey everyone, I have a quick question about the a_x_mod(15) function in Lab 4, specifically regarding the following code: if a not in [2,7,8,11,13]: raise ValueError("'a' must be 2,7,8,11 or 13") Is this to ensure that a is coprime with 15? If so, why can't 4 and 14 be included in the list? Thanks in advance.
Avatar
Anonymous 26-Jul-20 11:56 AM
Guy's I have a doubt in lab5, couldn't seem to understand how to solve it?
Avatar
Anonymous 26-Jul-20 12:09 PM
Hey everyone, I have a quick question about the a_x_mod(15) function in Lab 4, specifically regarding the following code:
>
if a not in [2,7,8,11,13]: raise ValueError("'a' must be 2,7,8,11 or 13")
>
Is this to ensure that a is coprime with 15? If so, why can't 4 and 14 be included in the list? Thanks in advance.
@Anonymous Hey, so for example, if you do 4^1 = 4 mod 15, 4^2 = 1 mod 15, 4^3 = 4 mod 15, you can see that it only cycles between 4 and 1, which isn't a good period. If you look at the list [2, 7, 8, 11, 13], you can see that exponentiating from 1 to 14 produces all the numbers between 0 -14.
Avatar
Anonymous 26-Jul-20 12:11 PM
i guess that makes sense, but in that case, what would one do with extremely large numbers? do the possible values of a have a much higher chance of cycling 'nicely' when N is large (like RSA primes) or is there some additional protocol that needs to be employed? thanks @Anonymous !
Avatar
Anonymous 26-Jul-20 12:14 PM
i guess that makes sense, but in that case, what would one do with extremely large numbers? do the possible values of a have a much higher chance of cycling 'nicely' when N is large (like RSA primes) or is there some additional protocol that needs to be employed? thanks @Anonymous !
@Anonymous This is why RSA works :) It's hard to find the answer of a^x = b mod pq, where you're solving for x, and pq is the multiplication of two prime numbers :) Mathematically speaking, a needs to be a primitive root: https://brilliant.org/wiki/primitive-roots/#:~:text=A%20primitive%20root%20mod%20n,modn)).
x is hard to solve for, and that's why RSA works 🙂
Avatar
Anonymous 26-Jul-20 12:16 PM
But in this case, we're not solving for x, we're discussing suitable candidates for a, am I right?
Avatar
Anonymous 26-Jul-20 12:17 PM
Guy's I have a doubt in lab5, couldn't seem to understand how to solve it?
@Anonymous Singh Hey, so you need to find a line that passes through all the nodes in this setup (think of it as connecting the dots)
But in this case, we're not solving for x, we're discussing suitable candidates for a, am I right?
@Anonymous Yes
Avatar
Anonymous 26-Jul-20 12:18 PM
i understand that the fundamental challenge posed by Shor's algorithm is that finding the period (or, in other words, solving for x) is challenging for large p and q. But the algorithm in the notebook is explicitly assuming what the 'good' values of a are, which seems to include more specifications than just being coprime with N. What I'm confused about is, is there a good way to further whittle down the possible values of a without manually checking them
or do the non-primitive roots of N get vastly outnumbered by the primitive roots of N for large N
Avatar
Anonymous 26-Jul-20 12:21 PM
i understand that the fundamental challenge posed by Shor's algorithm is that finding the period (or, in other words, solving for x) is challenging for large p and q. But the algorithm in the notebook is explicitly assuming what the 'good' values of a are, which seems to include more specifications than just being coprime with N. What I'm confused about is, is there a good way to further whittle down the possible values of a without manually checking them
@Anonymous Hmmmm, there's something called the Euler totient function, which tells you how many primitive roots you have for N, which narrows down your choices for a
Avatar
Anonymous 26-Jul-20 12:22 PM
I'll look into that, thanks so much for your help @Anonymous !
Avatar
Anonymous 26-Jul-20 12:22 PM
There are methods to find a primitive root 🙂
This might help 🙂
So phi here, is the Euler totient function I mentioned 🙂
❤️ 1
In modular arithmetic, a branch of number theory, a number g is a primitive root modulo n if every number a coprime to n is congruent to a power of g modulo n. That is, g is a primitive root modulo n if for every integer a coprime to n, there is an integer k such that gk ≡ a ...
Avatar
Anonymous 26-Jul-20 12:24 PM
perfect, will read - thanks again!
Avatar
Anonymous 26-Jul-20 12:25 PM
Does anyone know what the elements inside a qubit vector mean? I mean, in |0> = [1, 0] what are the 1 and 0 elements there? Can I say it's 1 +0.i? As such for |1> = [0,1] = 0 + i.1. Am I thinking wrong?
Avatar
Anonymous 26-Jul-20 01:05 PM
Avatar
Anonymous 26-Jul-20 01:23 PM
Thanks for the instructors and mentors for this first week. I'm learning and enjoying it a lot!
Avatar
Anonymous 26-Jul-20 01:25 PM
@Anonymous I don't think so! In general, the elements inside these matrices don't have any kind of notation preassumed. What you can say is that these vectors are eigenvectors of a given matrix. In this case, for example, |0> = [1 0] and |1>=[0 1] are the eigenvectors of sigma_z. |+> and |-> até the eigenvectors of sigma_x and you can check that. You can also search for the eigenvectors of sigma_y and I think you'll understand this perfectly! :)
Avatar
Anonymous 26-Jul-20 01:50 PM
Avatar
Anonymous 26-Jul-20 02:23 PM
Hey guys I can't seem to be able to submit the labs4, did anyone experience this issue?
Avatar
Anonymous 26-Jul-20 06:57 PM
Can anyone tell me which part in the circuit did I not get right ??
This is the circuit for shor's algorithm in lab 4
@Anonymous
Avatar
Anonymous 26-Jul-20 07:05 PM
Can anyone tell me which part in the circuit did I not get right ??
@Anonymous I believe you should only initialize the last qubit to the |1> state... your first n hadamard gates are correct but only put the x gate on the q7
Avatar
Anonymous 26-Jul-20 07:07 PM
Correct, gate x should be only on the 7th qubit
8th counting from 0
Avatar
Anonymous 26-Jul-20 07:12 PM
@Anonymous @Anonymous
Avatar
Anonymous 26-Jul-20 07:12 PM
that looks right from what i see!
Avatar
Anonymous 26-Jul-20 07:13 PM
I did but I am still not getting the answer
Avatar
Anonymous 26-Jul-20 07:13 PM
are u swapping in iqft? (edited)
Avatar
Anonymous 26-Jul-20 07:13 PM
Is am using the iqft in built function
Avatar
Anonymous 26-Jul-20 07:14 PM
make sure
do_swaps=False
(edited)
👍 1
Avatar
Anonymous 26-Jul-20 07:14 PM
@Anonymous should I do it after writing the iqft code ??
Avatar
Anonymous 26-Jul-20 07:14 PM
nope, in the QFT function, as one of the inputs 🙂 (edited)
Avatar
Anonymous 26-Jul-20 07:15 PM
Are those powers in the circuit right? I remember 8 and 4 but I'm not sure about 1 and 2
Avatar
Anonymous 26-Jul-20 07:15 PM
yep, it's 1, 2, 4, 8 🙂
Avatar
Anonymous 26-Jul-20 07:17 PM
Okay, thank you. Swaps are only necessary if you use power q, as a can recall
Avatar
Anonymous 26-Jul-20 07:17 PM
@Anonymous can you give me the code to implement swapping in the inbuilt QFT function ??
Avatar
Anonymous 26-Jul-20 07:19 PM
@Anonymous can you give me the code to implement swapping in the inbuilt QFT function ??
@Anonymous
gate = QFT(num_qubits=len(measurement_qubits), approximation_degree=0, do_swaps=False, inverse=True, insert_barriers=False, name='iqft')
Avatar
Anonymous 26-Jul-20 07:28 PM
@Anonymous Or simply gate = QFT(len(measurement_qubits), do_swaps=False).inverse() (edited)
👍 1
Avatar
Anonymous 26-Jul-20 07:34 PM
Still not getting it right
This is my circuit
Avatar
Anonymous 26-Jul-20 07:38 PM
what's the error you're getting at the end? @Anonymous (edited)
Avatar
Anonymous 26-Jul-20 07:43 PM
These are my outputs
Avatar
Anonymous 26-Jul-20 07:44 PM
ahhhh ok, hmmm
output should look like
but my circuit looks like yours
Avatar
Anonymous 26-Jul-20 07:47 PM
I think I am having problem in swapping..or in this case no swapping
Avatar
Anonymous 26-Jul-20 07:50 PM
may i see your apply_qft function?
Avatar
Anonymous 26-Jul-20 07:56 PM
If it was an issue with swapping, the histogram would be much less uniform
Avatar
Anonymous 26-Jul-20 07:58 PM
@Anonymous I got my problem solved
Thanks a lot for your help
In the above pics I somehow didn't implement the iqft
Which later I did with proper swapping
👍 2
Avatar
Anonymous 26-Jul-20 08:01 PM
So the swapping for the invQFT is not required because the way we have implemented the U gates took care of that?
Avatar
Anonymous 26-Jul-20 08:02 PM
I think it’s because of which control qubits are used for which exponents (edited)
Swapping the control qubits, swapping the exponents, and swapping the IFQT inputs should all have the same effect on x
The order of the U inputs doesn't really matter since we're not measuring w, just entangling it with x (edited)
Avatar
Anonymous 26-Jul-20 08:06 PM
@Anonymous Thanks
👍 1
Avatar
Anonymous 26-Jul-20 08:06 PM
Actually I really had to swap in the end
Avatar
Anonymous 26-Jul-20 08:08 PM
That's probably because of how you applied the U gates. As long as it works out in the end, it's all good.
Avatar
Anonymous 26-Jul-20 08:08 PM
Oh... thanks @Anonymous
👍 1
Avatar
Anonymous 27-Jul-20 12:48 AM
I ama bit confused about distinguishing between logical 0 and 1 (or logical + and -) in a surface code. The idea of even parity for logical 0 (or +) and odd parity for logical 1 (or -) is not crystal clear to me. Can anyone please help?
Avatar
Anonymous 27-Jul-20 12:48 AM
@Anonymous I am not able to submit any labs
must be a server issue.. will try again today
Avatar
Anonymous 27-Jul-20 01:01 AM
I am not able to submit any labs
@Anonymous What's the error? I just submitted a lab and it worked
Avatar
Anonymous 27-Jul-20 02:04 AM
I ama bit confused about distinguishing between logical 0 and 1 (or logical + and -) in a surface code. The idea of even parity for logical 0 (or +) and odd parity for logical 1 (or -) is not crystal clear to me. Can anyone please help?
@Anonymous Hi , I am not sure about it . But reading again in surface code there plaquettes and vertices where it identify the |0> state in plaquette depends on the nearest states.
Avatar
Anonymous 27-Jul-20 03:15 AM
Why this is throwing an error can anybody please guide??
Avatar
Anonymous 27-Jul-20 03:18 AM
@Anonymous It shows lab2/ex1 correct and does not move ahead
its been like this for hours
inspite of restarting kernel and running all cells again
restarting windows did not work either
Avatar
Anonymous 27-Jul-20 03:25 AM
how to import grading tool
Avatar
Anonymous 27-Jul-20 03:40 AM
getting error in importing grading tool
Avatar
Anonymous 27-Jul-20 04:04 AM
Why this is throwing an error can anybody please guide??
@Anonymous This is because you don’t have IBM Quantum Experience API token saved in your computer. Can you check the mentor hints for lab5? https://discord.com/channels/729706617951485954/737193098295377940/737193993309388881
Avatar
Anonymous 27-Jul-20 04:18 AM
Yep I am done with lab 5.....thanks for your guidance....
👍 1
Avatar
Anonymous 27-Jul-20 04:23 AM
restarting windows did not work either
@Anonymous have you tried optimization_level = 3 in the transpiler?
Avatar
Anonymous 27-Jul-20 04:29 AM
@Anonymous naravindar is the problem solved? (edited)
I have the exact same error as yours since yesterday
Avatar
Anonymous 27-Jul-20 05:12 AM
same problem since Friday
Avatar
Anonymous 27-Jul-20 05:50 AM
@Anonymous Chan Lee I recreated a new python file and recoded from first line again / restarted kernel/ ran all cells again / due to stroke of luck it worked
Till now, i dont know what was the cause for the problem
I was about to give up
@Anonymous Preis I tried to change opt levels only, but it did not seem to help
Avatar
Anonymous 27-Jul-20 05:54 AM
ModuleNotFoundError: No module named 'qiskit.ignis'
what i should do to fix it
Avatar
Anonymous 27-Jul-20 06:12 AM
@Anonymous where does it happen? is it on your machine?
Avatar
Anonymous 27-Jul-20 06:13 AM
yes @Anonymous Now i had fixed it.. Thanks for asking.
Avatar
Anonymous 27-Jul-20 08:10 AM
Why did we need to use do_swaps=False in Lab 4?
@Anonymous
Avatar
Anonymous 27-Jul-20 08:11 AM
Why did we need to use do_swaps=False in Lab 4?
@Anonymous because you get the ordering wrong in the first half
👍 1
see if you have done the same
you have reversed the order in the first half so you are removing the swap in the second half to compensate for that
Avatar
Anonymous 27-Jul-20 08:12 AM
Ok so if we changed the control qubits to go bottom up we could do swaps
Avatar
Anonymous 27-Jul-20 08:12 AM
Ok so if we changed the control qubits to go bottom up we could do swaps
@Anonymous yes
👍 1
Avatar
Anonymous 27-Jul-20 08:12 AM
Thank you @Anonymous you’re the man
Avatar
Anonymous 27-Jul-20 08:13 AM
🙂
Avatar
Anonymous 27-Jul-20 08:48 AM
Avatar
Anonymous 27-Jul-20 09:19 AM
Guys, Are the slides for lecture 5 out?
Avatar
Anonymous 27-Jul-20 09:37 AM
@Anonymous Singh yes, check #announcements
Avatar
Anonymous 27-Jul-20 10:29 AM
submitted all labs..thanks
Avatar
Anonymous 27-Jul-20 10:29 AM
Dear @Anonymous Diz and Qiskit organizing team, given the holiday you guys mentioned earlier in the crowdcast, and also for those of us who want to to catch-up and spend some more time on it due to other obligations (work, it would be great if (only a suggestion), if we can have more time on the labs, if possible. Thank you for his great summer school opportunity. (edited)
Avatar
Anonymous 27-Jul-20 10:32 AM
@Anonymous is lab 6 available
Avatar
Anonymous 27-Jul-20 10:41 AM
@Anonymous thanks for the heads up. We'll announce as soon as we determine the best way to respect this request 🙂
Avatar
Anonymous 27-Jul-20 10:43 AM
@Anonymous no not yet today 11.30pm IST will be available
Avatar
Anonymous 27-Jul-20 11:24 AM
ddo we need to complete the final project for the certificate or will an aggregate of 65 percent on all the coding assignments give us the certificate?
Avatar
Anonymous 27-Jul-20 11:33 AM
@Anonymous Ghosh final project is completely optional
Avatar
Anonymous 27-Jul-20 11:47 AM
. I'm getting error " no module named grading_tools"
I've imported grading files too
Avatar
Anonymous 27-Jul-20 11:52 AM
. I'm getting error " no module named grading_tools"
@Anonymous hey, are you running locally?
Avatar
Anonymous 27-Jul-20 11:53 AM
Yupp
Avatar
Anonymous 27-Jul-20 11:53 AM
Yupp
@Anonymous make sure your directory looks like this 🙂
so ex1 is the file you're working with, there should be a folder called grading_tools 🙂
Avatar
Anonymous 27-Jul-20 11:55 AM
Yess there is..and it has 4 files within
Avatar
Anonymous 27-Jul-20 11:57 AM
hmmm interesting
is the folder unzipped?
Avatar
Anonymous 27-Jul-20 11:57 AM
Hey...I got the problem...thanks
👍 1
Avatar
Anonymous 27-Jul-20 12:11 PM
Anyone interested in taking a revision session for today's lecture for folks like me not coming from physics background before tomorrow's session?
Avatar
Anonymous 27-Jul-20 12:18 PM
Anyone interested in taking a revision session for today's lecture for folks like me not coming from physics background before tomorrow's session?
@Anonymous Hussain Don't know if I will have time for a full-fledged revision session, but I can try to answer specific questions.
Avatar
Anonymous 27-Jul-20 12:24 PM
@Anonymous Aren't we getting exposure to IBM Quantum Circuit in any lecture further?
Avatar
Anonymous 27-Jul-20 12:25 PM
I spent over an hour trying to debug lab 4, apparently [range(n)] is not the same as list(range(n))??? 🤦
Avatar
Anonymous 27-Jul-20 12:25 PM
nope [range(n)] = [[0,1, ..., n]] list(range(n)) = [0,1, ..., n] (edited)
Avatar
Anonymous 27-Jul-20 12:25 PM
@Anonymous Hussain Don't know if I will have time for a full-fledged revision session, but I can try to answer specific questions.
@Anonymous sure soham that will work, @Anonymous / @Anonymous Prathap can you help us here
Avatar
Anonymous 27-Jul-20 12:28 PM
I'm having some trouble with grade system on Lab2. lab2/ex1 - ❌ Failed: session owner does not match request owner Can someone help me, please? 🙂 (edited)
Avatar
Anonymous 27-Jul-20 12:28 PM
@Anonymous I did a test in the python shell and that's right, I just wasn't thinking properly 😂 got it now though, onto lab 5!
Avatar
Anonymous 27-Jul-20 12:28 PM
I'm having some trouble with grade system on Lab2. lab2/ex1 - ❌ Failed: session owner does not match request owner Can someone help me, please? 🙂
@Anonymous see #lab-1
Avatar
Anonymous 27-Jul-20 12:29 PM
@Anonymous see #lab-1
@Anonymous thank u a lot! 🙂
👍 1
Avatar
Anonymous 27-Jul-20 12:38 PM
I am curious to know what fraction of total participants have submitted all the labs so far. 🙃 (edited)
Avatar
Anonymous 27-Jul-20 12:45 PM
@Anonymous Asthana true! maybe a data sheet of all participants' lab numbers and submission times. Wonder if they even store the data :$ I was thinking of this same thing a few days ago
Avatar
Anonymous 27-Jul-20 12:48 PM
@Anonymous I have done this in the last part. I have hand written the code where it is coming as 18 cx. but not in jupyter. when i am running it the ans is 14 cx. I am attaching my hand written code also (lab 5) (edited)
continuation to my last text (lab 5)
Avatar
Anonymous 27-Jul-20 12:51 PM
@Anonymous I have done this in the last part. I have hand written the code where it is coming as 18 cx. but not in jupyter. when i am running it the ans is 14 cx. I am attaching my hand written code also (lab 5)
@Anonymous Hmmm, i'm not seeing node 7 in there
Avatar
Anonymous 27-Jul-20 12:53 PM
@Anonymous You should not repeat vertex, they should be there one time only
👍 1
Avatar
Anonymous 27-Jul-20 12:55 PM
Yes, you want to find a Hamiltonian path, which is a path in a (directed or undirected) graph (the FakeTokyo layout of qubits is a graph) that visits each vertex exactly once (edited)
Avatar
Anonymous 27-Jul-20 01:00 PM
@Anonymous You should not repeat vertex, they should be there one time only
@Anonymous Yes but i have not repeated any vertex ..... 19,14,18,13,12,11,17,16,15,10,6,5,0,1,2,3,9,4,8
Avatar
Anonymous 27-Jul-20 01:01 PM
@Anonymous Yes but i have not repeated any vertex ..... 19,14,18,13,12,11,17,16,15,10,6,5,0,1,2,3,9,4,8
@Anonymous you're missing 7 🙂
Avatar
Anonymous 27-Jul-20 01:05 PM
@Anonymous there are 20 qubits total and we need 19 only so missing 7 is fine
The question remains why he gets 14 cx
Avatar
Anonymous 27-Jul-20 01:10 PM
>
@Anonymous there are 20 qubits total and we need 19 only so missing 7 is fine @Anonymous that's why I left 7, intentionally
Avatar
Anonymous 27-Jul-20 01:10 PM
@Anonymous I have run your chain and cx 18 as expected
have you changed something in the definition of the repetition code?
Avatar
Anonymous 27-Jul-20 01:10 PM
Because we are using d=8 repetition codes
Avatar
Anonymous 27-Jul-20 01:10 PM
it feels like your d=8 and not 10
👍 2
Avatar
Anonymous 27-Jul-20 01:10 PM
@Anonymous I have run your chain and cx 18 as expected
@Anonymous thats unusual 😮
Avatar
Anonymous 27-Jul-20 01:11 PM
& repetition codes should have 2(𝑑−1) cx gates in, which means 14 in this case.
👍 2
Avatar
Anonymous 27-Jul-20 01:11 PM
We are using d=10 in the final task
👍 3
Avatar
Anonymous 27-Jul-20 01:11 PM
thank u thank u all. my d was 8! now its 10 and am getting the desired result!
👍 4
Avatar
Anonymous 27-Jul-20 01:20 PM
Is there a lab session today?
Avatar
Anonymous 27-Jul-20 01:21 PM
Is there a lab session today?
@Anonymous Yes, it will be posted in #lab-exercises soon 🙂
Avatar
Anonymous 27-Jul-20 01:21 PM
okk
Avatar
Anonymous 27-Jul-20 01:25 PM
What is this error?
Avatar
Anonymous 27-Jul-20 01:27 PM
What is this error?
@Anonymous Ahhh, this is a server issue, first try changing optimization_level=3
Avatar
Anonymous 27-Jul-20 01:27 PM
Where can I find that?
ok got it
Avatar
Anonymous 27-Jul-20 01:28 PM
the line with mycircuit_t (edited)
Avatar
Anonymous 27-Jul-20 01:28 PM
I dont know why, but it is taking forever to load...
Avatar
Anonymous 27-Jul-20 01:29 PM
yeah, it's a server overload
Avatar
Anonymous 27-Jul-20 01:29 PM
oh
Avatar
Anonymous 27-Jul-20 01:29 PM
but try optimization_level=3 first because a lot of us here were able to submit with this 🙂
Avatar
Anonymous 27-Jul-20 01:37 PM
Will there be a lab today?
Avatar
Anonymous 27-Jul-20 01:38 PM
Will there be a lab today?
@Anonymous yes, coming soon :)
Avatar
Anonymous 27-Jul-20 01:42 PM
Hi how can we take a back up of the discussions happening in all these channels for future reference after the summer school
Avatar
Anonymous 27-Jul-20 01:45 PM
Hi how can we take a back up of the discussions happening in all these channels for future reference after the summer school
@Anonymous I would like to have an option for this as well : ( there are some discussions that I am not able to follow completely as I am not an expert in QC, given the time this would improve
👍 3
Avatar
Anonymous 27-Jul-20 01:52 PM
Why isn't lab available yet?
Any idea?
Avatar
Anonymous 27-Jul-20 01:53 PM
Guys just be patient, it usually come out in these hours, it will be released soon
Avatar
Anonymous 27-Jul-20 01:54 PM
I don't get why you're so desperate for the labs 🤔
🤣 2
Avatar
Anonymous 27-Jul-20 01:55 PM
😂
Avatar
Anonymous 27-Jul-20 01:55 PM
hhahaha
Avatar
Anonymous 27-Jul-20 01:55 PM
I get scared when they're released
It's like Oh shit, here we go again
🤣 10
Avatar
Anonymous 27-Jul-20 01:55 PM
@Anonymous today a bit more
🤣 2
Avatar
Anonymous 27-Jul-20 02:07 PM
Is Lab6 posted yet?
Avatar
Anonymous 27-Jul-20 02:07 PM
Not yet, just be patient 🙂
Avatar
Anonymous 27-Jul-20 02:07 PM
just relax mate
Avatar
Anonymous 27-Jul-20 02:08 PM
You'll find the newly posted lab in #lab-exercises , just be patient (edited)
qiskitsmart 5
Avatar
Anonymous 27-Jul-20 02:11 PM
Lab 5 from fake_tokyo
Avatar
Anonymous 27-Jul-20 02:14 PM
ya what about that
Avatar
Anonymous 27-Jul-20 02:36 PM
do we have lab today?
Avatar
Anonymous 27-Jul-20 02:37 PM
Yes, just be patient 🙂
Avatar
Anonymous 27-Jul-20 02:41 PM
i'm off to sleep. Bubye guys
👋 7
👍 1
Avatar
Anonymous 27-Jul-20 02:50 PM
Is there any lab for day 6?
Avatar
Anonymous 27-Jul-20 02:50 PM
Yes, just be patient 🙂
Avatar
Anonymous 27-Jul-20 02:51 PM
Also where is the lecture note of day 6?
Avatar
Anonymous 27-Jul-20 02:51 PM
Also where is the lecture note of day 6?
@Anonymous Mazumder Also not posted yet, but there's a bunch of notes under #memorable-lecture-notes 🙂
Avatar
Anonymous BOT 27-Jul-20 03:10 PM
Daily Schedule (Monday - Friday Only) Times Presented in EDT (UTC -04) 8:30 AM : Daily Update Posted in Discord & Emailed - including Lecture Link & Password 9:00 AM : Lecture Begins via Crowdcast 12:00 PM : Lecture Ends via Crowdcast 12:30 PM : Lecture Notes & Recording Link Posted in Discord   1:00 PM : Lab Session Access Link & Notebook Posted in Discord 1:30 PM : Previous Day Lab Work Solution Posted in Discord
Avatar
Anonymous 27-Jul-20 03:11 PM
Daily Schedule (Monday - Friday Only) Times Presented in EDT (UTC -04)
>
8:30 AM : Daily Update Posted in Discord & Emailed - including Lecture Link & Password
>
9:00 AM : Lecture Begins via Crowdcast
>
12:00 PM : Lecture Ends via Crowdcast
>
12:30 PM : Lecture Notes & Recording Link Posted in Discord  
>
1:00 PM : Lab Session Access Link & Notebook Posted in Discord
>
1:30 PM : Previous Day Lab Work Solution Posted in Discord
@Anonymous are you trying to tease us robo guy
we are waiting for lab and you posting schedule
Avatar
Anonymous 27-Jul-20 03:12 PM
haha
its ok on the bright side i finished lab 5
😶 1
Avatar
Anonymous 27-Jul-20 03:22 PM
So on Lab 5 why are ther 8 numbers
instead of 7?
{'0': {'0 0 000 000': 8192}, '1': {'1 1 000 000': 8192}}
when you output the code
Avatar
Anonymous 27-Jul-20 03:25 PM
its the order
Avatar
Anonymous 27-Jul-20 03:25 PM
what?
Avatar
Anonymous 27-Jul-20 03:25 PM
7**(i) has those order
the output gives you the order in with 7**(i) is predicted to be cycling
Avatar
Anonymous 27-Jul-20 03:27 PM
I am very confused
shouldn't it give you 000 0 000 for the 0 qubit with no errors
Avatar
Anonymous 27-Jul-20 03:29 PM
sorry
you are talking about lab 5
Avatar
Anonymous 27-Jul-20 03:29 PM
and 111 000 1
yeah
Avatar
Anonymous 27-Jul-20 03:29 PM
i got confused with lab 4
my bad (edited)
Avatar
Anonymous 27-Jul-20 03:29 PM
don't worry
Avatar
Anonymous 27-Jul-20 03:30 PM
ya
Avatar
Anonymous 27-Jul-20 03:30 PM
so 000 0 000 and 1 000 111
Avatar
Anonymous 27-Jul-20 03:30 PM
it confused me too
Avatar
Anonymous 27-Jul-20 03:30 PM
for no errors
Avatar
Anonymous 27-Jul-20 03:30 PM
and i dont have any clue
Avatar
Anonymous 27-Jul-20 03:30 PM
oh
Does anyone else know?
Avatar
Anonymous 27-Jul-20 03:32 PM
I wonder if there's an issue going on. Today's lab is a bit late and the #admins group was created. At least I hadn't seen it before...
Avatar
Anonymous 27-Jul-20 03:33 PM
so 000 0 000 and 1 000 111
@Anonymous i got it
its not the reault
result
Avatar
Anonymous 27-Jul-20 03:33 PM
@Anonymous Hopefully itll get fixed soon. Otherwise we all get free marks!
Avatar
Anonymous 27-Jul-20 03:34 PM
if you replace the result with job.result().get_counts() then you will get what you are talking about
Avatar
Anonymous 27-Jul-20 03:34 PM
I'm not really worried about the marks, tbh
Avatar
Anonymous 27-Jul-20 03:35 PM
the last 7 digit are the state and first one is log
0 and 1
see the code
Avatar
Anonymous 27-Jul-20 03:36 PM
The first day after half-term is usually the slack day for me. I might work on the problem set in the meantime
@Anonymous You are a genius mate 😄
I like this online help chat. It allows me to sit next to you while doing the exercises (figuratively speaking)
Avatar
Anonymous 27-Jul-20 03:41 PM
😁 😁 😁
Avatar
Anonymous 27-Jul-20 03:45 PM
for log in ['0','1']: #raw_results[log] = job.result().get_counts(log) raw_results[log] = job.result().get_counts('0') raw_results[log] = job.result().get_counts('1') results = code.process_results( raw_results ) #results = job.result().get_counts()
How come this amended code doesn't work
Avatar
Anonymous 27-Jul-20 03:46 PM
because
Avatar
Anonymous 27-Jul-20 03:47 PM
I have overwritten it
Avatar
Anonymous 27-Jul-20 03:47 PM
you forgot to get it out of the loop
log = 0 raw_results[0] = job.result().get_counts('0') raw_results[0] = job.result().get_counts('1') you run the loop l =1 raw_results[] = job.result().get_counts('0') raw_results[1] = job.result().get_counts('1')
so take it out of the loop if you want to do that (edited)
Avatar
Anonymous 27-Jul-20 03:51 PM
no lab six?
Avatar
Anonymous 27-Jul-20 03:51 PM
no lab six?
@Anonymous not yet
quantumcomputing 2
@Anonymous the thing you are looking is this i guess
the result we are getting using the given code is a processed one results = code.process_results( raw_results ) has been used to process it
Avatar
Anonymous 27-Jul-20 03:58 PM
It would be nice to see what process_results(raw_results) does
@Anonymous as I understand that what you are doing is feeding the results into this fuction as an list
Avatar
Anonymous 27-Jul-20 03:59 PM
will look into it and get back to you once i find it
if someone knows pls help
Avatar
Anonymous 27-Jul-20 04:00 PM
Can non-linear capacitors help in making anharmonic oscillators?
Avatar
Anonymous 27-Jul-20 04:00 PM
@Anonymous I believe so
but personally I don't know of any but I know of non linear inductances
such as the Kinetic inductance of a inductor
Avatar
Anonymous 27-Jul-20 04:01 PM
So is there a particular reason as to why non-linear inductance was considered in isolating the energy levels?
such as the Kinetic inductance of a inductor
@Anonymous oh okay
Avatar
Anonymous 27-Jul-20 04:02 PM
I may be completely wrong here but you can feed a DC current into a nanowire (an inductor) and change its inductance
But I believe they use Josephson Junctions which are slightly different
Avatar
Anonymous 27-Jul-20 04:03 PM
dude for one sec i thought the same person is asking and answering his own question
😂 3
hahaha
Avatar
Anonymous 27-Jul-20 04:04 PM
split personality problems
Avatar
Anonymous 27-Jul-20 04:05 PM
lol😂
Avatar
Anonymous 27-Jul-20 04:05 PM
Lol
Avatar
Anonymous 27-Jul-20 04:06 PM
When your sleep cycle changes after doing labs on a regular basis and no lab yet so I tried to sleep and for the past 2 hours still trying to doze off. It's 1:36am here xD
🇱 2
🇦 2
🇧 2
Avatar
Anonymous 27-Jul-20 04:06 PM
split personality problems2
Avatar
Anonymous 27-Jul-20 04:06 PM
my sleep cycle is completely reversed
🇱 2
🇦 2
🇧 2
Avatar
Anonymous 27-Jul-20 04:07 PM
mine too
Avatar
Anonymous 27-Jul-20 04:07 PM
Codie I saw earlier that you went to sleep too I guess
🇱 2
🇦 2
🇧 2
XD
Avatar
Anonymous 27-Jul-20 04:07 PM
sometimes i play violin at 2 am to check how the neighbors are doing
😂 7
🇱 2
🇦 2
🇧 2
Avatar
Anonymous 27-Jul-20 04:07 PM
😂
🇱 3
🇦 3
🇧 2
Avatar
Anonymous 27-Jul-20 04:08 PM
Omg that's hilarious 😂
🇱 2
🇦 2
🇧 2
Avatar
Anonymous 27-Jul-20 04:13 PM
lab
🇱 3
🇦 3
🇧 3
Avatar
Anonymous 27-Jul-20 04:14 PM
Codie I saw earlier that you went to sleep too I guess
@Anonymous yup but i couldn't find peace. I thought the lab would have been uploaded by now and came back (edited)
😥 1
lets do lab on all the msg
🇱 4
🇦 4
🇧 4
Avatar
Anonymous 27-Jul-20 04:19 PM
Loll will there be labs today?
🇱 2
🇦 2
🇧 2
Avatar
Anonymous 27-Jul-20 04:19 PM
Loll will there be labs today?
@Anonymous Im Yep, just not released yet 🙂
🇱 4
🇦 4
🇧 4
Avatar
Anonymous 27-Jul-20 04:19 PM
Thanks. It is late than usual
🇱 3
🇦 3
🇧 3
Avatar
Anonymous 27-Jul-20 04:20 PM
hahahaha too much fun
🇱 6
🅰️ 6
🇧 6
Avatar
Anonymous 27-Jul-20 04:23 PM
That is lab is so late that I might not be able to complete it. 😦
👆 1
Avatar
Anonymous 27-Jul-20 04:23 PM
Mentors must be like:
😍 3
😂 6
🇸 5
🇹 5
🇦 5
🇵 6
🇭 5
❗ 5
❕ 4
❣️ 3
Avatar
Anonymous 27-Jul-20 04:24 PM
😂
🤣 2
this i why i love this community
❤️ 5
🇶 5
🇮 5
🇸 5
🇰 5
ℹ️ 5
🇹 5
🇱 5
🇴 5
🇻 5
🇪 5
🤓 2
Avatar
Anonymous 27-Jul-20 04:27 PM
🐶 5
😍 2
here you go everyone, today's lab 😄
Avatar
Anonymous 27-Jul-20 04:28 PM
😍
i want one too
Avatar
Anonymous 27-Jul-20 04:28 PM
Operation H_gate Lab? (edited)
🇱 3
🇦 3
🇧 3
❔ 2
Avatar
Anonymous 27-Jul-20 04:33 PM
|LAB> H_gate Measure
Avatar
Anonymous 27-Jul-20 04:33 PM
Who ever is waiting for just like me... Can please participate in this in meantime. Hello! @Anonymous Dear learned & the learners,mentors,volunteers ,academicians, researchers, scholars . Today I'm about to share a link with all of you. It consists of a set of questionnaire which usually ponder in our mind, when one studies Quantum Computing for the first time. Feel free to explore your mind and boost our brain with your views and opinion. I request everyone to participate, give your suggestions and feedback. We would be discussing our views regarding the answers on Qiskit slack. Looking forward to your active participation. Thank you very much.blushhttps://forms.gle/EmVhWwkrm5ZwsvQk9
You're welcome. "Dissipate your knowledge by participating".
Avatar
Anonymous 27-Jul-20 04:34 PM
|🐶 > H_gate Measure
Avatar
Anonymous 27-Jul-20 04:34 PM
Lab> = Blochsphere
Avatar
Anonymous 27-Jul-20 04:34 PM
I would be happy to have your resposes in it... Thank you in advance.
Avatar
Anonymous 27-Jul-20 04:36 PM
guys i have a question
Avatar
Anonymous 27-Jul-20 04:36 PM
@Anonymous Reminds me of Lab snacks from Thor Labs
Avatar
Anonymous 27-Jul-20 04:37 PM
okay so Codie is my formal name my real name is Rohit so how does this looks Games|Rohit> = |Codie>
👍 1
Avatar
Anonymous 27-Jul-20 04:37 PM
Lab1>Lab2>Lab3>Lab4>Lab5>Lab6> = Vector_0 Vector_0 Vector_0 Vector_0 Vector_0 H(0>)
Avatar
Anonymous 27-Jul-20 04:38 PM
🙂 is Games a unitary operator?
😆 5
Avatar
Anonymous 27-Jul-20 04:38 PM
It looks just like you wrote...
Avatar
Anonymous 27-Jul-20 04:38 PM
🙂 is Games a unitary operator?
@Anonymous Preis lemme see gaming|Codie> = insane|Codie> no its not unitary😢 (edited)
Avatar
Anonymous 27-Jul-20 04:38 PM
when i first heard of dagger, a weapon came up in my head
😆 4
Avatar
Anonymous 27-Jul-20 04:39 PM
same here bro (edited)
Avatar
Anonymous 27-Jul-20 04:42 PM
@Anonymous which games are you into
Avatar
Anonymous 27-Jul-20 04:42 PM
😂 3
Avatar
Anonymous 27-Jul-20 04:42 PM
@Anonymous LOLLL
Avatar
Anonymous 27-Jul-20 04:43 PM
@Anonymous which games are you into
@Anonymous all. I love all games
Avatar
Anonymous 27-Jul-20 04:44 PM
@Anonymous interestingly though in our case the a dagger operator is the creation operator whereas the simple a represents annihilation
👍 2
Avatar
Anonymous 27-Jul-20 04:47 PM
@Anonymous all. I love all games
@Anonymous nicee
Avatar
Anonymous 27-Jul-20 04:47 PM
i was playing league of legends before summer school a new champ is going to be released soon.
and to make me more excited he is brother of my favourite champion in Lore
Avatar
Anonymous 27-Jul-20 04:49 PM
@Anonymous Preis lemme see gaming|Codie> = insane|Codie> no its not unitary😢
@Anonymous if <Codie|Codie> = <Rohit|Rohit> you are good (edited)
Avatar
Anonymous 27-Jul-20 04:51 PM
both are normalized state i guess.
wait wait i have one
@Anonymous Preis I go to a doctor and say <Codie|Rohit> = 0 and he diagnosed a disease what's it??? (edited)
Avatar
Anonymous 27-Jul-20 04:54 PM
death?
😆 1
in the sense of dead schrödinger's cat is orthogonal to alive cat
Avatar
Anonymous 27-Jul-20 04:55 PM
No, split personality disorder. Because |Codie> is orthogonal to |Rohit> (edited)
😆 3
hahahah
Okay i know its a lame joke
Avatar
Anonymous 27-Jul-20 04:55 PM
I diagnose you with... death
😆 3
Avatar
Anonymous 27-Jul-20 04:56 PM
I diagnose you with... death
@Anonymous i will haunt you in your dreams then
Avatar
Anonymous 27-Jul-20 04:56 PM
i have a dream joke but i don't remember it
Avatar
Anonymous 27-Jul-20 04:57 PM
okay i have one
They laughed and said what a lame joke.
anyone get it🙁
Avatar
Anonymous 27-Jul-20 04:58 PM
no bro, sorry
Avatar
Anonymous 27-Jul-20 04:58 PM
nop 😦
Avatar
Anonymous 27-Jul-20 04:59 PM
No I totally don't get that joke sorry bro. . .
Avatar
Anonymous 27-Jul-20 04:59 PM
if they laughed then the joke is not lame anymore because they laughed at it
okay i'm bad at this
hahahaha
Avatar
Anonymous 27-Jul-20 04:59 PM
But the laughs could have been fake
Avatar
Anonymous 27-Jul-20 04:59 PM
where is the lab 6 ?
Avatar
Anonymous 27-Jul-20 05:00 PM
Has anybody watched The Office?
where is the lab 6 ?
@Anonymous not uploaded yet
Avatar
Anonymous 27-Jul-20 05:00 PM
where is the lab 6 ?
@Anonymous In a superposition state waiting to be measured
😆 3
Avatar
Anonymous 27-Jul-20 05:00 PM
Avatar
Anonymous 27-Jul-20 05:01 PM
Has anybody watched The Office?
@Anonymous One of my favourites
Avatar
Anonymous 27-Jul-20 05:02 PM
@Anonymous One of my favourites
@Anonymous Ramesh BEST
Avatar
Anonymous 27-Jul-20 05:03 PM
@Anonymous thx
Avatar
Anonymous 27-Jul-20 05:03 PM
okay i haven't watched it so i will sit and watch you guys talk about it
Avatar
Anonymous 27-Jul-20 05:03 PM
@Anonymous Ramesh yup!!
Avatar
Anonymous 27-Jul-20 05:04 PM
okay i haven't watched it so i will sit and watch you guys talk about it
@Anonymous Instead of watching us you should go ahead and watch it directly 😛 Laughter is the best way to get your code to work
Avatar
Anonymous 27-Jul-20 05:05 PM
wait
Avatar
Anonymous 27-Jul-20 05:06 PM
Dwight was the best character
😍 1
Avatar
Anonymous 27-Jul-20 05:06 PM
are you talking about "The office"
Avatar
Anonymous 27-Jul-20 05:06 PM
yes
Avatar
Anonymous 27-Jul-20 05:06 PM
i have seen it too
Avatar
Anonymous 27-Jul-20 05:06 PM
Its weird thinking the next generation will not understand the environment of the office (edited)
Avatar
Anonymous 27-Jul-20 05:07 PM
yeaah
Avatar
Anonymous 27-Jul-20 05:09 PM
😂 3
Avatar
Anonymous 27-Jul-20 05:09 PM
best dialogue ever
Avatar
Anonymous 27-Jul-20 05:18 PM
the Office...my favorite show ever
Avatar
Anonymous 27-Jul-20 05:18 PM
for everyone asking where lab 6 is
😆 4
Avatar
Anonymous 27-Jul-20 05:20 PM
See how they make this one super hard
Avatar
Anonymous 27-Jul-20 05:21 PM
Avatar
Anonymous 27-Jul-20 05:26 PM
@Anonymous Diz For advanced question #3, part (b), there is a typo in the page you uploaded, but it's correct in the video
Avatar
Anonymous 27-Jul-20 05:27 PM
Skip that one for now then 😛
Avatar
Anonymous 27-Jul-20 05:41 PM
Avatar
Anonymous 27-Jul-20 06:06 PM
!careerquestions What is the transition from the academia to the industry like?
👍 1
GreenTick 1
Avatar
Anonymous 27-Jul-20 06:14 PM
Gotta say, this was the first lab where I felt I didn't understand anything about it nor how it really related to the class, yet it was the fastest one I've done as everything is in the bundled notebook (edited)
Avatar
Anonymous BOT 27-Jul-20 06:24 PM
Day 1 Lecture: https://www.crowdcast.io/e/qgss-day6 / password: qiskitday6 Lecture Notes: Coming Soon! For Week 1 (Day 1-5) lecture links, enter command !lastweek
Avatar
Anonymous 27-Jul-20 06:47 PM
Great lab! My favorite so far c: really enjoyed Nick's explanation 👍
Avatar
Anonymous 27-Jul-20 07:13 PM
Is there a recording of the labs for those of us who could not log in live... but plan to do them tonight? (edited)
Avatar
Anonymous 27-Jul-20 07:14 PM
yep, see #lab-exercises, all the links of the lab recordings are there 🙂 (edited)
Avatar
Anonymous 27-Jul-20 07:36 PM
damn i dont understand a thing of lab 6... things escalated quickly from lecture 5 to 6
👆 4
Avatar
Anonymous 27-Jul-20 08:00 PM
yeah there's a lot of new content here, it's a bit of a departure from some of the previous topics. Any specific questions at the moment?
Avatar
Anonymous 27-Jul-20 08:19 PM
I am a little stuck. I understand what a Rabi oscialltion is meant to do but am stuggling with the code mainly
rabi_schedule = pulse.Schedule(name='rabi_experiment')
Avatar
Anonymous 27-Jul-20 08:20 PM
Some help here please While trying to grade exercise 1b, I'm getting an HTTP Error Is anybody facing the same situation?
🙋‍♂️ 2
Avatar
Anonymous 27-Jul-20 08:21 PM
Yep, the mentors are looking into it 🙂
Avatar
Anonymous 27-Jul-20 08:29 PM
rabi_schedule = pulse.Schedule(name='rabi_experiment') @Anonymous I think this line by itself just creates an empty Schedule object (named rabi_experiment), to which we then want to add pulses in order to drive Rabi oscillations for precisely controlled amounts of time. The other notebook has some example code showing how to add pulses.
Does that clear anything up?
Avatar
Anonymous 27-Jul-20 08:31 PM
Yeah, ill look at the other notebook and work it out thanks
How do you load your IBMQ account
Avatar
Anonymous 27-Jul-20 08:35 PM
Right before your load_account() function call
IBMQ.save_account('APIToken')
(edited)
👆 1
👍 1
Avatar
Anonymous 27-Jul-20 08:41 PM
Thanks
Avatar
Anonymous 27-Jul-20 08:54 PM
@Anonymous I have the following error when grading lab 6 exercice ex1b
@Anonymous
➕ 4
🇭 1
Avatar
Anonymous 27-Jul-20 08:55 PM
Hi @Anonymous ! We are looking into the issue with the second lab
👍 4
🇹 5
🇾 4
qiskitsmart 2
Avatar
Anonymous 27-Jul-20 09:23 PM
Hi @Anonymous can you DM me your notebook and also a screenshot of the full error?
Avatar
Anonymous 27-Jul-20 09:25 PM
@Anonymous Asfaw if I'm getting the same error can I send my notebook as well?
Avatar
Anonymous 27-Jul-20 09:26 PM
One second, let me do one at a time. If we don't get a response from @Anonymous in 5 minutes, then yes 🙂
Avatar
Anonymous 27-Jul-20 09:29 PM
Ok, thanks!
Avatar
Anonymous 27-Jul-20 09:30 PM
ok let's do this 🙂 @Anonymous can you please send me your notebook and also a screenshot of the full error?
Avatar
Anonymous 27-Jul-20 09:32 PM
Sure, gimme a couple of mins
Avatar
Anonymous 27-Jul-20 09:33 PM
@Anonymous Asfaw can I help? I got the same error
Avatar
Anonymous 27-Jul-20 09:34 PM
Hi! I'm trying to understand the error one at a time. But a full screenshot of the error here would be super helpful 🙂
Avatar
Anonymous 27-Jul-20 09:35 PM
Avatar
Anonymous 27-Jul-20 09:36 PM
super helpful -- thank you @Anonymous Bernier
Avatar
Anonymous 27-Jul-20 09:36 PM
@Anonymous Asfaw my pleasure
Avatar
Anonymous 27-Jul-20 09:37 PM
Hi in lab 6 ex1 , the Pi pulse amplitude is 0.25 . In the note book it says"The 𝜋 pulse amplitude is half the period of the sinusoid."
Avatar
Anonymous 27-Jul-20 09:39 PM
Hi @Anonymous Asfaw, hope this helps as well. I was able to get this to submit around 6pm EST time 🙂 But I tried to submit now to test for the others experiencing the HTTPError, and I'm also getting the same error everyone was getting: https://discordapp.com/channels/729706617951485954/735115703346266172/737459548344025199
Avatar
Anonymous 27-Jul-20 09:39 PM
Here is another one
Avatar
Anonymous 27-Jul-20 09:40 PM
Hi @Anonymous Asfaw, hope this helps as well. I was able to get this to submit around 6pm EST time 🙂
>
But I tried to submit now to test for the others experiencing the HTTPError, and I'm also getting the same error everyone was getting: https://discordapp.com/channels/729706617951485954/735115703346266172/737459548344025199
@Anonymous OK this is a nice hint too 🙂 Thank you! And congratulations on getting all the labs so far. Pokemon - gotta catch 'em all
😄 4
😂 1
🇵 3
🆗 3
🇪 3
🇲 3
🇴 3
🇳 3
🧙 1
Hi @Anonymous -- can you share the full error? Top to bottom
Avatar
Anonymous 27-Jul-20 09:42 PM
Sorry, I hope this is better
Avatar
Anonymous 27-Jul-20 09:43 PM
I can't submit ex1b too, but I'm getting that my answer failed. I'm not sure if it's just the same problem or that my answer is not correct.
Avatar
Anonymous 27-Jul-20 09:44 PM
@Anonymous U can you please post full error top to bottom?
Avatar
Anonymous 27-Jul-20 09:46 PM
@Anonymous Asfaw yes:
Avatar
Anonymous 27-Jul-20 09:48 PM
Abe for president!
🇹 2
🇭 2
🇦 2
🇳 2
🇰 2
🇸 2
Avatar
Anonymous 27-Jul-20 09:48 PM
@Anonymous Asfaw here's the whole error
Avatar
Anonymous 27-Jul-20 09:49 PM
Hi @Anonymous Asfaw, when I first run it I got the HTTP 400 error. Immediately after I restarted the kernell, run all, and this is what I got now. Hope it helps! quantumidea
Avatar
Anonymous 27-Jul-20 09:50 PM
Even the errors are different for different runs. Sometimes it's session error, sometimes validation error.
H_gate 2
Avatar
Anonymous 27-Jul-20 09:54 PM
Even the errors are different for different runs. Sometimes it's session error, sometimes validation error.
@Anonymous now even internet errors look quantum! Measure
😆 1
Avatar
Anonymous 27-Jul-20 09:55 PM
@Anonymous now even internet errors look quantum! Measure
@Anonymous agreed!!
🤣 1
Avatar
Anonymous 27-Jul-20 09:57 PM
OK so we looked at all these errors, and it seems that you are all competing for the same server slots, and that's what's causing the errors for only some of you. I'd say let's keep retrying for now. The server side looks fine on our end.
👍 6
SuperimposedSmileWhite 3
qiskitsmart 2
🆗 2
🇹 1
🇭 1
🅰️ 1
🇳 1
🇰 1
🇸 1
🆎 2
🇪 1
Avatar
Anonymous 27-Jul-20 09:58 PM
OK so we looked at all these errors, and it seems that you are all competing for the same server slots, and that's what's causing the errors for only some of you. I'd say let's keep retrying for now. The server side looks fine on our end.
@Anonymous Asfaw awesome. Will try that!
Avatar
Anonymous 27-Jul-20 10:02 PM
OK so we looked at all these errors, and it seems that you are all competing for the same server slots, and that's what's causing the errors for only some of you. I'd say let's keep retrying for now. The server side looks fine on our end.
@Anonymous Asfaw weird though, it let ex1a through but not ex1b
👍 1
Avatar
Anonymous 27-Jul-20 10:06 PM
@Anonymous Asfaw weird though, it let ex1a through but not ex1b
@Anonymous same here . Submitted Ex1 a but got stuck in the submission of Ex1b
Avatar
Anonymous 27-Jul-20 10:06 PM
@Anonymous same here . Submitted Ex1 a but got stuck in the submission of Ex1b
@Anonymous same here
Avatar
Anonymous 27-Jul-20 10:07 PM
same here
Avatar
Anonymous 27-Jul-20 10:08 PM
I tried to execute twice. Ex1a submitted but for Ex1b 400 Client error. I think its better to do later on .
Avatar
Anonymous 27-Jul-20 10:08 PM
gotcha. is it okay to comment out ex1a submission once it's accepted? Or do they need to come in as a pair?
Avatar
Anonymous 27-Jul-20 10:09 PM
gotcha. is it okay to comment out ex1a submission once it's accepted? Or do they need to come in as a pair?
@Anonymous you can comment it out 🙂
Avatar
Anonymous 27-Jul-20 10:09 PM
@Anonymous thx!
Avatar
Anonymous 27-Jul-20 10:14 PM
Same here
Avatar
Anonymous 27-Jul-20 10:14 PM
Still got the shame error
Avatar
Anonymous 27-Jul-20 10:15 PM
I'm getting the 422 error, did I get the wrong answer or does it have something to do with the grading system (edited)
Avatar
Anonymous 27-Jul-20 10:19 PM
gotcha. is it okay to comment out ex1a submission once it's accepted? Or do they need to come in as a pair?
@Anonymous This is a good idea
They don't need to come as a pair
Can you tell us if that works out for you?
Avatar
Anonymous 27-Jul-20 10:20 PM
@Anonymous Asfaw I just tried it. It did not work for me
Avatar
Anonymous 27-Jul-20 10:20 PM
with the commented out ex1a?
Avatar
Anonymous 27-Jul-20 10:21 PM
Yes
Avatar
Anonymous 27-Jul-20 10:21 PM
can you comment out ex1b and see if ex1a still good?
Avatar
Anonymous 27-Jul-20 10:21 PM
Sure. Just a moment
Avatar
Anonymous 27-Jul-20 10:22 PM
Okay, now it seems to be grading, however the response is not sending any cause for failure. This makes the grading module to throw ...Retrying with a fresh session.... On retry answer_response.get('cause') is still set to None. Might this be just an API issue? @Anonymous Asfaw
Avatar
Anonymous 27-Jul-20 10:23 PM
Yes. it worked just How I would expect. just a message saying ex1a is correct
Avatar
Anonymous 27-Jul-20 10:23 PM
can you comment out ex1b and see if ex1a still good?
@Anonymous Asfaw I commented it out and still the same error 😅
Avatar
Anonymous 27-Jul-20 10:23 PM
lol
wilde_utah and pedrorrivero you just told me two conflicting things
if i understand correctly, pedrorrivero, did you comment out ex1b and ex1a still gives you error?
Avatar
Anonymous 27-Jul-20 10:24 PM
btw, if your answer was already accepted for ex1a you can just comment it out b/c it doesn't help with server resources to keep resubmitting
👍 2
Avatar
Anonymous 27-Jul-20 10:24 PM
The server accepted my 1a submission and timed out on 1b with a 422 error.
Avatar
Anonymous 27-Jul-20 10:25 PM
Avatar
Anonymous 27-Jul-20 10:26 PM
if i understand correctly, pedrorrivero, did you comment out ex1b and ex1a still gives you error?
@Anonymous Asfaw no, my bad! I missread, ex1a works like a charm!
Avatar
Anonymous 27-Jul-20 10:27 PM
Same error for me when the 1a line is commented out.
Quick, no one submit anything for the next minute! /s
Avatar
Anonymous 27-Jul-20 10:27 PM
@Anonymous Asfaw will reduce the number of samples help with error 422?
Avatar
Anonymous 27-Jul-20 10:28 PM
Just to clarify. I get the 422 error on ex1b regardless of if ex1a is commented or not. Ex1a will grade and submit regardless of if ex1b is commented or not.
👍 3
👆 3
Avatar
Anonymous 27-Jul-20 10:29 PM
Just to clarify. I get the 422 error on ex1b regardless of if ex1a is commented or not. Ex1a will grade and submit regardless of if ex1b is commented or not.
@Anonymous Same here
Avatar
Anonymous 27-Jul-20 10:29 PM
Same here
Avatar
Anonymous 27-Jul-20 10:36 PM
@Anonymous Asfaw commenting out ex1b doesnt seem to affect 1a, it works every time (I havent tried that many times), and commenting out 1a doesnt seem to help 1b in that 1b still fails each time (with "None ...Retrying with a fresh session..." followed by the 422 error). I was just hoping commenting out 1b might reduce the queue and let some through, assuming that's the issue.
👍 2
Avatar
Anonymous 27-Jul-20 10:37 PM
ok I think we now have a clearer picture
will look into this -- unfortunately might be a little late to diagnose now, but we'll get to this early in the morning tomorrow
👍 10
what i'm getting from this is that we have issues with 1b and not 1a
👍 4
Avatar
Anonymous 27-Jul-20 10:38 PM
no problem, thank you!
Avatar
Anonymous 27-Jul-20 10:38 PM
Thank you for your help Abe
Avatar
Anonymous 27-Jul-20 10:39 PM
still not sure how some were able to get 1b to work, and how it shows fine on our end right now
this is one of these corner cases that's probably going to be hard to find but we'll get it 🙂
👍 8
Avatar
Anonymous 27-Jul-20 10:40 PM
Thanks Abe!
Avatar
Anonymous 27-Jul-20 11:06 PM
For Lab 5 I tried copying Token to my local disk. It says set overwrite=True
How do I do it?
Avatar
Anonymous 27-Jul-20 11:06 PM
For Lab 5 I tried copying Token to my local disk. It says set overwrite=True
@Anonymous second argument i.e " token", overwrite=True. IBMQ.save_account("token string", overwrite=True) (edited)
@Anonymous Let me know if it worked.
Avatar
Anonymous 27-Jul-20 11:17 PM
I tried overwrite=True
And then ran the code again
It is giving me an error again
Avatar
Anonymous 27-Jul-20 11:17 PM
I tried overwrite=True
@Anonymous what's the error?
Avatar
Anonymous 27-Jul-20 11:17 PM
I was also getting same error for 6b. I think commenting out the server (#'https://eu-gb.functions.cloud.ibm.com/api/v1/web/salvador.de.la.puente.gonzalez%40ibm.com_dev/default/qgss_grading',) in grade.py which was causing the issue helped. Or the issue might be resolved as well. (edited)
👍 2
Avatar
Anonymous 27-Jul-20 11:17 PM
Avatar
Anonymous 27-Jul-20 11:17 PM
I tried overwrite=True
@Anonymous I got same error.
Avatar
Anonymous 27-Jul-20 11:19 PM
@Anonymous what's the error?
@Anonymous I posted a picture.
Avatar
Anonymous 27-Jul-20 11:19 PM
@Anonymous IBMQ.save_account("Token ID ",overwrite=True) IBMQ.load_account() provider = IBMQ.get_provider(hub='ibm-q')
It should work
Avatar
Anonymous 27-Jul-20 11:20 PM
I successfully installed qiskit, yet am unable to load my account in the Jupyter notebook. Each time I load my account in Jupyter notebook here is the response I get RequestsApiError: 401 Client
Avatar
Anonymous 27-Jul-20 11:20 PM
@Anonymous IBMQ.save_account("Token ID ",overwrite=True)
>
IBMQ.load_account() provider = IBMQ.get_provider(hub='ibm-q')
@Anonymous I tried using this
It still have me an error
Avatar
Anonymous 27-Jul-20 11:20 PM
@Anonymous follow the second answer.
Avatar
Anonymous 27-Jul-20 11:21 PM
@Anonymous follow the second answer.
@Anonymous Cat 🐈 I'll take a look. Thanks!
Avatar
Anonymous 27-Jul-20 11:22 PM
@Anonymous Cat 🐈 I'll take a look. Thanks!
@Anonymous Yes look for @Anonymous Cat 🐈 . I think you have to delete and active the account again using code.IBMQ.delete_account().IBMQ.active_account() .Thanks @Anonymous Cat 🐈
👍 1
@Anonymous Yes look for @Anonymous Cat 🐈 . I think you have to delete and active the account again using code.IBMQ.delete_account().IBMQ.active_account() .Thanks @Anonymous Cat 🐈
@Anonymous You have copy your token in the place of token ID
@Anonymous You have copy your token in the place of token ID
@Anonymous Login into your IBM quantum computing account and copy token and paste in the section "TOKEN ID" . Its a password so cannot show.
Avatar
Anonymous 27-Jul-20 11:25 PM
I ran the delete account code
And I got this error. Am I missing something?
I also imported Qiskit before beginning
Avatar
Anonymous 27-Jul-20 11:26 PM
I ran the delete account code
(edited)
@Anonymous Ok.You are doing a simple mistake of loading account.
@Anonymous API_KEY=" token id to be copied "
Avatar
Anonymous 27-Jul-20 11:28 PM
It says IBMq not defined
@Anonymous API_KEY=" token id to be copied "
@Anonymous Ahh yes! I've corrected that now
I ran the code again with my token as API key and now it says IBMQ is not defined
Avatar
Anonymous 27-Jul-20 11:31 PM
@Anonymous Ahh yes! I've corrected that now
@Anonymous I think clear the output and restart again
Avatar
Anonymous 27-Jul-20 11:33 PM
I closed the nbk
ad tried again, it says the same thing
IBMQ is not defined
Avatar
Anonymous 27-Jul-20 11:33 PM
Actually u can finish the lab without doing that ibmq setup dude. It will post the fake_tokyo-like output which shows ibmq machine
Which is not so important in finishing the lab (cmiiw(
Avatar
Anonymous 27-Jul-20 11:36 PM
Actually u can finish the lab without doing that ibmq setup dude. It will post the fake_tokyo-like output which shows ibmq machine
@Anonymous Yes , it gives the tokyo map output , but token and ibmq should work ? i know it may be not important.
Avatar
Anonymous 27-Jul-20 11:38 PM
@Anonymous Yes , it gives the tokyo map output , but token and ibmq should work ? i know it may be not important.
@Anonymous thoughts exactly
I've been racking my brain on this one for some time now
qiskitsmart 1
Actually u can finish the lab without doing that ibmq setup dude. It will post the fake_tokyo-like output which shows ibmq machine
@Anonymous Thanks dude! I ran the lab, but I wanted to do it properly.
Avatar
Anonymous 27-Jul-20 11:41 PM
I'm facing the same error with the client server as well, despite saving my account again. IBMQ was not used in ex1 so it shouldnt affect the result actually
*ex1 lab 6
Avatar
Anonymous 27-Jul-20 11:46 PM
I'm trying to the run the exercise that Nick ran in the lab demo, and I keep getting this curve for the On-resonant Rabi drive:
I don't see sinusoid with the correct phase input in spite of changing Nothing from the given notebook!
Avatar
Anonymous 27-Jul-20 11:52 PM
I'm trying to the run the exercise that Nick ran in the lab demo, and I keep getting this curve for the On-resonant Rabi drive:
@Anonymous are you doing loop?
Avatar
Anonymous 27-Jul-20 11:53 PM
I don't see sinusoid with the correct phase input in spite of changing Nothing from the given notebook!
@Anonymous I'm getting the same
Avatar
Anonymous 27-Jul-20 11:53 PM
if you're doing a for, don't. The for is being done in the next cell
Avatar
Anonymous 27-Jul-20 11:55 PM
if you're doing a for, don't. The for is being done in the next cell
@Anonymous nop, I did not change anything, I only run my own job because I was getting the error with predefined job's number (edited)
Avatar
Anonymous 27-Jul-20 11:59 PM
I'm getting a brokenprocessprotocol error in the cell where rabi_result=backend_sim.run(...),can anyone please help!!!
Avatar
Anonymous 28-Jul-20 12:00 AM
Looks like it just takes some time for lab6:ex1b to go through. Mine finally went through without changes
🎉 2
Avatar
Anonymous 28-Jul-20 12:01 AM
that
I'm getting a brokenprocessprotocol error in the cell where rabi_result=backend_sim.run(...),can anyone please help!!!
@Anonymous When I had the error of having my code into a for then that part was getting me an error , something like -1 or idk
that's why i asked you if you wrote a for in your code
Avatar
Anonymous 28-Jul-20 12:02 AM
@Anonymous no I didn't write any for loop
Avatar
Anonymous 28-Jul-20 12:07 AM
@Anonymous are you doing loop?
@Anonymous But the "for" loop is in the cell before the plot. and unless defined the rabi_values list is not going to be populated.
Avatar
Anonymous 28-Jul-20 12:10 AM
I'm getting a brokenprocessprotocol error in the cell where rabi_result=backend_sim.run(...),can anyone please help!!!
@Anonymous hey, what's your build_ramsey_pulse_schedule function?
Avatar
Anonymous 28-Jul-20 12:12 AM
@Anonymous
Here is my rabi pulse function @Anonymous
Avatar
Anonymous 28-Jul-20 12:14 AM
hmmm i don't see anything wrong with that
is this a repetitive error you see? like hmmm, i would suggest save and restart running the jupyter notebook again
Avatar
Anonymous 28-Jul-20 12:19 AM
@Anonymous yup restarted the kernel, no improvement, same error
Avatar
Anonymous 28-Jul-20 12:20 AM
@Anonymous yup restarted the kernel, no improvement, same error
@Anonymous interesting... can you screenshot the whole error?
Avatar
Anonymous 28-Jul-20 12:22 AM
Avatar
Anonymous 28-Jul-20 12:25 AM
@Anonymous This is my rabi pulse schedule for reference
but i'm not seeing anything different
maybe the end parameters?
Avatar
Anonymous 28-Jul-20 12:26 AM
I had the same error with my Mac but alrighty with my Windows PC, regarding @Anonymous 's question (edited)
Avatar
Anonymous 28-Jul-20 12:26 AM
That's the server error I guess? Or is something else amiss
Avatar
Anonymous 28-Jul-20 12:27 AM
@Anonymous Hao thats interesting 🤔🤔
So now, I don't have another Windows pc 😢😢
Avatar
Anonymous 28-Jul-20 12:27 AM
nope everyone is getting errors running the second to last block, the error @Anonymous doesnt look like a grading error
do you have the latest version of qiskit installed?
Avatar
Anonymous 28-Jul-20 12:28 AM
this is one of these corner cases that's probably going to be hard to find but we'll get it 🙂
@Anonymous Asfaw I sent you a DM with a possible reason as to why ex1b is failing! Hope it helps
Avatar
Anonymous 28-Jul-20 12:28 AM
@Anonymous i dinstalled it the day qgss started
*installed
Avatar
Anonymous 28-Jul-20 12:29 AM
ahhh okay
Avatar
Anonymous 28-Jul-20 12:33 AM
@Anonymous should I complete the rest and try to submit??
Avatar
Anonymous 28-Jul-20 12:33 AM
yep, try it :)
perhaps the mentors might have encountered this :)
Avatar
Anonymous 28-Jul-20 12:34 AM
@Anonymous Did you only comment out ('https://eu-gb.functions.cloud.ibm.com/api/v1/web/salvador.de.la.puente.gonzalez%40ibm.com_dev/default/qgss_grading',)? I tried to comment this line out, but still got the same 422 Client Error.
Avatar
Anonymous 28-Jul-20 12:40 AM
@Anonymous yes, that gonzalez one was giving error for me, so i tried commenting it out..
Avatar
Anonymous 28-Jul-20 12:41 AM
@Anonymous Did you only comment out ('https://eu-gb.functions.cloud.ibm.com/api/v1/web/salvador.de.la.puente.gonzalez%40ibm.com_dev/default/qgss_grading',)? I tried to comment this line out, but still got the same 422 Client Error.
@Anonymous After that, close the notebook and open it again. It works.
Avatar
Anonymous 28-Jul-20 12:42 AM
@Anonymous After that, close the notebook and open it again. It works.
@Anonymous Rodríguez this stuff worked for me. thanks
👍 2
Avatar
Anonymous 28-Jul-20 12:42 AM
is this the grading issue fix :D
Avatar
Anonymous 28-Jul-20 12:45 AM
Did anyone get a BrokenProcessPool error?
Avatar
Anonymous 28-Jul-20 12:45 AM
@Anonymous yes
Avatar
Anonymous 28-Jul-20 12:46 AM
Did anyone get a BrokenProcessPool error?
@Anonymous mac or windows?
Avatar
Anonymous 28-Jul-20 12:46 AM
@Anonymous After that, close the notebook and open it again. It works.
@Anonymous Rodríguez Worked here too. Thanks!
👍 1
Avatar
Anonymous 28-Jul-20 12:46 AM
@Anonymous Mac
Avatar
Anonymous 28-Jul-20 12:46 AM
@Anonymous without solving this error, I won't get the answer of 1b
x90_pulse ain't getting defined
Avatar
Anonymous 28-Jul-20 12:48 AM
@Anonymous hi, some people are getting BrokenProcessPool errors, and we noticed they're running Mac OS (edited)
Avatar
Anonymous 28-Jul-20 12:49 AM
@Anonymous this is happening in the cell rabi_result=backend_sim.run(...) (edited)
Avatar
Anonymous 28-Jul-20 12:49 AM
worst case scenario, i could teach you guys how to run these labs on google colab lolol (edited)
Avatar
Anonymous 28-Jul-20 12:50 AM
>
Did anyone get a BrokenProcessPool error? @Anonymous Yea I got it too for 1a but the grading script will still work on it
Avatar
Anonymous 28-Jul-20 12:51 AM
@Anonymous but without solving that error, you won't get the answer to 1b??
Avatar
Anonymous 28-Jul-20 12:53 AM
oh you're right haha
Avatar
Anonymous 28-Jul-20 12:58 AM
We need the result to save the 90 pulse, without that, 1b couldn't be finished, I guess.
Avatar
Anonymous 28-Jul-20 12:58 AM
Yes
Avatar
Anonymous 28-Jul-20 12:58 AM
@Anonymous Rodríguez Thank you for your information, I tried to re-open it and this time I get the "onnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))" Does anyone also have this same connection error?
Avatar
Anonymous 28-Jul-20 01:00 AM
@Anonymous Rodríguez Thank you for your information, I tried to re-open it and this time I get the "onnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))" Does anyone also have this same connection error?
@Anonymous Try again xD I got the same error once, but in the second it worked
Don't close again the notebook, just run again the evaluation cell.
Avatar
Anonymous 28-Jul-20 01:02 AM
@Anonymous Rodríguez Thanks, I will try again.
Avatar
Anonymous 28-Jul-20 01:02 AM
What is this error all about?
Avatar
Anonymous 28-Jul-20 01:02 AM
@Anonymous Rodríguez It works, thank you a lot!
👍 1
Avatar
Anonymous 28-Jul-20 01:03 AM
for those who have macs, were you guys able to run the lab6_drive_ham_rabi_ramsey.ipynb file with any issues?
or is it the same exact issue?
Avatar
Anonymous 28-Jul-20 01:04 AM
I'm getting an http issue in cell job=backend.retrieve_job(...)
Avatar
Anonymous 28-Jul-20 01:07 AM
You need IBMQ.save_account('token') IBMQ.load_account()
Avatar
Anonymous 28-Jul-20 01:08 AM
Yes I've done that
Avatar
Anonymous 28-Jul-20 01:08 AM
wait but that string id for job isn't yours
Avatar
Anonymous 28-Jul-20 01:08 AM
@Anonymous @Anonymous I have solved BrokenPoolProcess error by replacing requiremnets.txt file with
!pip install -U -r grading_tools/requirements_nowin.txt
requirements_nowin.txt was in grading tools
it pulls different aer from github
👍 3
Avatar
Anonymous 28-Jul-20 01:09 AM
yayyyyyy 🥳
thanks! :)
Avatar
Anonymous 28-Jul-20 01:10 AM
Thanks a lot @Anonymous
Avatar
Anonymous 28-Jul-20 01:10 AM
@Anonymous it takes a while to compile and build a wheel but it worked
👍 2
Avatar
Anonymous 28-Jul-20 01:13 AM
For those running into a lab 6 issue with the following error (Most likely if you're running on Mac OS):
BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending.
Change the first line of the code block to
!pip install -U -r grading_tools/requirements_nowin.txt
Credits to @Anonymous 🙂 (edited)
Avatar
Anonymous 28-Jul-20 01:15 AM
@Anonymous lab 6 😉
Avatar
Anonymous 28-Jul-20 01:15 AM
@Anonymous lab 6 😉
@Anonymous gotcha, thanks! 🙂
Avatar
Anonymous 28-Jul-20 01:32 AM
@Anonymous Thank you!
Avatar
Anonymous 28-Jul-20 01:41 AM
@Anonymous After that, close the notebook and open it again. It works.
@Anonymous Rodríguez How can I enter the link? It requires ID and Password.
Avatar
Anonymous 28-Jul-20 01:52 AM
answer1a is not defined... What is that?
Avatar
Anonymous 28-Jul-20 01:54 AM
In the superconducting lecture, it is mentioned that if I start at |0>, and apply a laser with frequency w{10}, then it will take the system to |1>, but no further above. I wanted to know what will happen if I apply a laser with frequency < w{10}. Does it then create a superposition? Furthermore, once the system is in state |1>, can I use a different laser with frequency w{21} to take it upto the energy level |2>? Or in other words, when the system is in state |0>, can I use a laser with frequency w{20} to bring it directly up to energy level |2>?
Avatar
Anonymous 28-Jul-20 01:56 AM
Hello
Anyones there ?
Avatar
Anonymous 28-Jul-20 01:58 AM
Anyones there ?
@Anonymous hi, hmmm did you run the block of code where answer1a is first defined?
Avatar
Anonymous 28-Jul-20 02:01 AM
There was problem in submitting in ex 2... Due to grade server
When i removed that line and restart now shows this error
Avatar
Anonymous 28-Jul-20 02:02 AM
When i removed that line and restart now shows this error
@Anonymous sorry, which line did you remove?
Avatar
Anonymous 28-Jul-20 02:04 AM
@Anonymous sorry, which line did you remove?
@Anonymous from grade.py file i removed eu-gb.functions.cloud.ibm.... This one
Avatar
Anonymous 28-Jul-20 02:04 AM
ahhhh, okay
Avatar
Anonymous 28-Jul-20 02:04 AM
Because it was showing server error.... Now it shows this one
Avatar
Anonymous 28-Jul-20 02:04 AM
some people restarted jupyter notebook and then reran after taking that line out :) (edited)
Avatar
Anonymous 28-Jul-20 02:05 AM
I've spent more time on grading than on the actual lab code
And the grading is still not done
Avatar
Anonymous 28-Jul-20 02:05 AM
some people restarted jupyter notebook and then reran :)
@Anonymous ok let me now try to run again all the cells once
Avatar
Anonymous 28-Jul-20 02:28 AM
Its again error after I restart and run the celss again
Ex1 is submitted ... Error in 2nd
Avatar
Anonymous 28-Jul-20 02:29 AM
Ok yeah, mentors will be looking into it tomorrow morning:)
Avatar
Anonymous 28-Jul-20 02:30 AM
Done Done
Avatar
Anonymous 28-Jul-20 02:32 AM
did you keep running the cell until it worked?
Avatar
Anonymous 28-Jul-20 02:33 AM
Yayyyyy 🥳 🥳 🥳 🥳
Avatar
Anonymous 28-Jul-20 02:34 AM
cause im trying that rn 😆 i keep getting a "None ...Retrying with a fresh session..." prompt which just fails as "lab6/ex1b - ❌ Failed: None"
Avatar
Anonymous 28-Jul-20 02:35 AM
did you keep running the cell until it worked?
@Anonymous i repeat the running process one by one after I removed that line from grade.py file
Avatar
Anonymous 28-Jul-20 02:35 AM
Avatar
Anonymous 28-Jul-20 02:35 AM
@Anonymous Remove this line from grade.py file and save it
Avatar
Anonymous 28-Jul-20 02:35 AM
omg ur a genius thanks man
Avatar
Anonymous 28-Jul-20 02:36 AM
Must restart your notebook after removing that server line
Avatar
Anonymous 28-Jul-20 02:36 AM
yeah for sure im trying rn... ill let yall know how it goes
🥳 2
Avatar
Anonymous 28-Jul-20 02:42 AM
The error people having with client 422 seems like it's due to bad server request/ overloaded. Simply comment out the link doesn't solve the problem as you don't make an api call to have your answer evaluated properly. Let's wait for tmr to see if you can run again.
👍 1
Avatar
Anonymous 28-Jul-20 02:43 AM
thanks a ton for ur help @Anonymous
🥳 1
🥳🎉
😍 2
Avatar
Anonymous 28-Jul-20 02:44 AM
yayyyyy! :)
Avatar
Anonymous 28-Jul-20 02:45 AM
Great Man ❤
Avatar
Anonymous 28-Jul-20 02:47 AM
Can anyone tell me the original code that was written in that cell...I have messed it up by mistake
Avatar
Anonymous 28-Jul-20 02:51 AM
Can anyone tell me the original code that was written in that cell...I have messed it up by mistake
@Anonymous download lab again and you'll see the actual code
Avatar
Anonymous 28-Jul-20 03:10 AM
Avatar
Anonymous 28-Jul-20 03:20 AM
?!?
same problem here too
Avatar
Anonymous 28-Jul-20 03:29 AM
@Anonymous Miqdad Khan I had this issue yesterday on some none-qc projects, and I was able to resolve the issue by uninstalling matplotlib, upgrading pip and installing matplotlib again. Not sure what's the cause though.
Avatar
Anonymous 28-Jul-20 03:32 AM
@Anonymous Tripathy same error
Avatar
Anonymous 28-Jul-20 03:33 AM
is this correct
i am getting error
Avatar
Anonymous 28-Jul-20 03:40 AM
I hope this helps :)
Avatar
Anonymous 28-Jul-20 03:49 AM
@Anonymous Miqdad Khan I had this issue yesterday on some none-qc projects, and I was able to resolve the issue by uninstalling matplotlib, upgrading pip and installing matplotlib again. Not sure what's the cause though.
@Anonymous didn't resolve 🤐
😂 2
Avatar
Anonymous 28-Jul-20 03:55 AM
Anyone has faced this error?
👍 2
Avatar
Anonymous 28-Jul-20 03:56 AM
Can someone please help me build the ramsey pulse schedule?
Avatar
Anonymous 28-Jul-20 04:15 AM
@Anonymous Tripathy same error
@Anonymous Pedone Same error here
Avatar
Anonymous 28-Jul-20 04:17 AM
I tried the above method ..and it's showing this error again
Avatar
Anonymous 28-Jul-20 04:17 AM
@Anonymous Miqdad Khan Hmmm werid...was the issue caused by the line "import matplotlib.pyplot as plt" right? If so, perhaps you can try to uninstall matplotlib and rerun the first cell which installs required libraries.
Avatar
Anonymous 28-Jul-20 04:18 AM
who got like this result ?
i am trying every time but got same result
Avatar
Anonymous 28-Jul-20 04:19 AM
@Anonymous Miqdad Khan Hmmm werid...was the issue caused by the line "import matplotlib.pyplot as plt" right? If so, perhaps you can try to uninstall matplotlib and rerun the first cell which installs required libraries.
@Anonymous I have done it but still getting errors 😢
Avatar
Anonymous 28-Jul-20 04:21 AM
@Anonymous I have the same error
With a 400 bad request on a server (eu.de)
Avatar
Anonymous 28-Jul-20 04:24 AM
@Anonymous Picca @Anonymous I was able to solve this by following Maajjyy's suggestions -- comment out the line that grades 1a, comment out the following line in grade.py, and then restart the jupyter notebook and rerun the cells:
Avatar
Anonymous 28-Jul-20 04:25 AM
@Anonymous Picca @Anonymous I was able to solve this by following Maajjyy's suggestions -- comment out the line that grades 1a, comment out the following line in grade.py, and then restart the jupyter notebook and rerun the cells:
@Anonymous Thanks, I will try 😀
Avatar
Anonymous 28-Jul-20 04:25 AM
@Anonymous thanks i will try too
Avatar
Anonymous 28-Jul-20 04:29 AM
@Anonymous Can anyone guide me or provide resources where these equations are derived? I have tried on my own, but I can't come up with the first term in H_eff, or maybe I am confusing between converting the Schrodinger and Interaction pictures. It will be very helpful. Thanks!
Avatar
Anonymous 28-Jul-20 04:33 AM
@Anonymous Thanks, I will try 😀
@Anonymous Picca This worked for me, thanks
👍 1
Avatar
Anonymous 28-Jul-20 04:37 AM
@Anonymous Picca did work with you , for me i got another error
SSLError: HTTPSConnectionPool(host='salvadelapuente.com', port=8088): Max retries exceeded with url: /validate-answer (Caused by SSLError(SSLError("bad handshake: SysCallError(10054, 'WSAECONNRESET')")))
Avatar
Anonymous 28-Jul-20 04:41 AM
@Anonymous Didn’t work for me too. It says that all grading servers are down. I will try again
Avatar
Anonymous 28-Jul-20 04:43 AM
i see let me try again too
Avatar
Anonymous 28-Jul-20 04:49 AM
finally..........
👍 1
Avatar
Anonymous 28-Jul-20 04:52 AM
I'm getting this 400 client error...help please
for lab 6b
I found a few answers on top but couldn't follow what was said
Avatar
Anonymous 28-Jul-20 04:56 AM
@Anonymous did you change anything or just retried untill it worked?
Avatar
Anonymous 28-Jul-20 04:56 AM
tried commenting the "https://eu-gb.function......." in grade.py
Avatar
Anonymous 28-Jul-20 05:00 AM
just retried
Avatar
Anonymous 28-Jul-20 05:02 AM
@Anonymous it worked for me! I have just retried
👍 1
Avatar
Anonymous 28-Jul-20 05:03 AM
@Anonymous in the grading tools?
Avatar
Anonymous 28-Jul-20 05:04 AM
yes grading_tools folder
Avatar
Anonymous 28-Jul-20 05:04 AM
@Anonymous Picca for me still same problem
Avatar
Anonymous 28-Jul-20 05:05 AM
@Anonymous Picca for me still same problem
@Anonymous Have you tried restarting the kernel?
Avatar
Anonymous 28-Jul-20 05:06 AM
I tried the technique mentioned above (commenting the line from grade.py). First attempt: Connection closed (or some error on those lines). Second attempt: I was able to get the assignment correct but couldnt send the results
Avatar
Anonymous 28-Jul-20 05:06 AM
Hi, For lab 6 ex1a went through but getting an error for the second one ex1b
Avatar
Anonymous 28-Jul-20 05:07 AM
Currently on my third attempt
Avatar
Anonymous 28-Jul-20 05:07 AM
This is the error i am getting for lab6 ex1b
anyone else faced a similar issue?
🥺 1
Avatar
Anonymous 28-Jul-20 05:07 AM
@Anonymous Picca yes i restarted but same problem
Avatar
Anonymous 28-Jul-20 05:07 AM
I am getting a 422 error. I believe there is a problem on server side
👍 2
Avatar
Anonymous 28-Jul-20 05:08 AM
Avatar
Anonymous 28-Jul-20 05:10 AM
Just got the same error
Avatar
Anonymous 28-Jul-20 05:15 AM
What should be the amplitude of the pulse in the exercise 1a ??
Avatar
Anonymous 28-Jul-20 05:17 AM
@Anonymous followed the steps and the commenting out...now the server isn't responding, shall I just keep retrying?
I restarted the kernel too
Avatar
Anonymous 28-Jul-20 05:18 AM
I got lab6/ex1b - Correct at my third attempt after commenting the server line on grade.py file and restarting the kernel. And please be sure you are commenting on the lab6\grading_tools folder, I had several failed attempts because I did on lab5 folder... 😉 (edited)
Avatar
Anonymous 28-Jul-20 05:19 AM
@Anonymous I'm getting this SSLError: HTTPSConnectionPool(host='salvadelapuente.com', port=8088): Max retries exceeded with url: /validate-answer (Caused by SSLError(SSLError("bad handshake: SysCallError(10054, 'WSAECONNRESET')",),))
Avatar
Anonymous 28-Jul-20 05:21 AM
@Anonymous
retry
Avatar
Anonymous 28-Jul-20 05:23 AM
The commenting trick isn't working out for me. This is my 5th attempt
Avatar
Anonymous 28-Jul-20 05:24 AM
@Anonymous have you restarted the kernel and run all the cells before running the grade part ?
Avatar
Anonymous 28-Jul-20 05:24 AM
yes. doing that before each attempt
Avatar
Anonymous 28-Jul-20 05:25 AM
@Anonymous also comment out one of the two calles to grade(...) first only garde ex1a, then ex1b - that did the trick for me
Avatar
Anonymous 28-Jul-20 05:25 AM
@Anonymous yes did that too. Same result.
Avatar
Anonymous 28-Jul-20 05:25 AM
yes, comment ex1a while running ex1b and vice versa
Avatar
Anonymous 28-Jul-20 05:25 AM
Gonne try restarting jupyter 🤷‍♀️
Avatar
Anonymous 28-Jul-20 05:26 AM
delete the answers.enc file from grading_tools and then restart kernel and try
Avatar
Anonymous 28-Jul-20 05:26 AM
I'm getting the similar error
Avatar
Anonymous 28-Jul-20 05:34 AM
@Anonymous thanks for the idea! But, i am still getting the same error. Will get lunch now and may be try again in a couple hours.
thanks for the help @Anonymous @Anonymous 🙂
Avatar
Anonymous 28-Jul-20 05:35 AM
I'm getting this error too: ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))
6a has been graded, so I commented it out
are we supposed to wait or did the Qiskit team provide a solution?
@Anonymous any comments on the above please?
Avatar
Anonymous 28-Jul-20 05:47 AM
I'm getting this error time and again
After having commented out the problematic server in the grade.py file
RemoteDisconnected error
Can anyone please help?
Avatar
Anonymous 28-Jul-20 05:54 AM
@Anonymous keeping trying...i got the same error and after 4 to 5 attempts it worked
@Anonymous Thank you...it worked!!
i had to try a few times before it finally went through
Avatar
Anonymous 28-Jul-20 05:56 AM
@Anonymous keeping trying...i got the same error and after 4 to 5 attempts it worked
@Anonymous did you get this remoteDisconnected error?
And did you delete the answer.enc file from grading folder?
Avatar
Anonymous 28-Jul-20 06:00 AM
yes .. I did
no it didn't
Avatar
Anonymous 28-Jul-20 06:01 AM
you are in quantum state
🤣 2
Avatar
Anonymous 28-Jul-20 06:01 AM
LOL
@Anonymous so got the error message but did not delete the answer.enc
Avatar
Anonymous 28-Jul-20 06:32 AM
@Anonymous I don't know the origin of the error it's keep happening. It will be good if you can share your code via dm.
Avatar
Anonymous 28-Jul-20 06:33 AM
How are yall doing the lab? Have yall understood the lecture? If yes then please temme how can I understand too
Avatar
Anonymous 28-Jul-20 06:48 AM
@Anonymous Fitter hi...everyone learns differently...if you didn't understand the lecture yesterday then I suggest you go through the MIT course 8.04 by Prof. Allan Adam
Avatar
Anonymous 28-Jul-20 06:48 AM
I have actually done 8.04 by barton zweibach
I dont understand how does that help exactly
Avatar
Anonymous 28-Jul-20 06:49 AM
which part of yesterday's lecture didn't you fully understand?
was it the classical mechanics EM part or the quantum part?
Avatar
Anonymous 28-Jul-20 06:50 AM
Im getting this error! Anyone got an idea to this
Avatar
Anonymous 28-Jul-20 06:50 AM
for the classical mechanics EM part...you should go through the excellent youtube channel for Dr.Physics...he has a series on classical EM @Anonymous Fitter
Avatar
Anonymous 28-Jul-20 06:51 AM
which part of yesterday's lecture didn't you fully understand?
@Anonymous The last 1 hour
Avatar
Anonymous 28-Jul-20 06:51 AM
@Anonymous what is the use of helper ??
Avatar
Anonymous 28-Jul-20 06:53 AM
Avatar
Anonymous 28-Jul-20 06:53 AM
OK @Anonymous Fitter MIT Course 8.04 lectures 8 and 9 for a refresher on the quantum oscillator and operators method...if that doesn't help, please let me know and we can get more specific
Avatar
Anonymous 28-Jul-20 06:55 AM
I have seen the one by barton zweibach
But okie I will check out the ones you stated
Avatar
Anonymous 28-Jul-20 06:55 AM
@Anonymous Fitter I did all the MIT QM lectures (both Barton and Allan) and the lecture really didn't go beyond 8.04
Avatar
Anonymous 28-Jul-20 06:55 AM
Okie thanks 🙂
Avatar
Anonymous 28-Jul-20 07:01 AM
Hi I got the 422 error. I followed @Anonymous 's advise and commented out the eu-gb server in grade.py and it worked. @Anonymous is that a viable approach?
Avatar
Anonymous 28-Jul-20 07:05 AM
I am getting this now after trying all suggested approaches
Avatar
Anonymous 28-Jul-20 07:11 AM
is your network speed good?
@Anonymous
Avatar
Anonymous 28-Jul-20 07:15 AM
Yes
Avatar
Anonymous 28-Jul-20 07:17 AM
Try commenting 2nd or 3rd server in grade.py And restart kernel and re-run the last cell
👍 1
@Anonymous
Avatar
Anonymous 28-Jul-20 07:27 AM
It worked 🙂 !!! Thank you!
commenting out the second one worked instead of third one and restarting and running all over again
@Anonymous
Avatar
Anonymous 28-Jul-20 07:28 AM
wait
ex1a is not done
yet
@Anonymous
Avatar
Anonymous 28-Jul-20 07:29 AM
I tried commenting the second server but still it's showing the same error for me😕
Avatar
Anonymous 28-Jul-20 07:30 AM
what error?
internet conn unreliable?
@Anonymous
Avatar
Anonymous 28-Jul-20 07:31 AM
ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
This is the exact error @Anonymous
Avatar
Anonymous 28-Jul-20 07:32 AM
I had done ex1a in the morning @Anonymous it was only ex1b that was having issues in submission
Avatar
Anonymous 28-Jul-20 07:32 AM
I tried commenting the second server but still it's showing the same error for me😕
@Anonymous u need to re-run again ig
I had done ex1a in the morning @Anonymous it was only ex1b that was having issues in submission
@Anonymous no issues
ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
@Anonymous try commenting the first one
Avatar
Anonymous 28-Jul-20 07:35 AM
If my email address doesn't end with a .com, but a .in, will it cause problems for grading labs?
Avatar
Anonymous 28-Jul-20 07:36 AM
No, I presume
Avatar
Anonymous 28-Jul-20 07:37 AM
@Anonymous u need to re-run again ig
@Anonymous Yes, I restarted my kernel and it worked fine! Thank you!!
Avatar
Anonymous 28-Jul-20 07:37 AM
thanks to @Anonymous
Avatar
Anonymous 28-Jul-20 07:48 AM
Again, happy to help :)
Avatar
Anonymous 28-Jul-20 07:53 AM
Finally! Thanks @Anonymous , @Anonymous !!!
Avatar
Anonymous 28-Jul-20 07:54 AM
np
Avatar
Anonymous 28-Jul-20 08:10 AM
@Anonymous Thanks I had simply overestimated what he was trying to say yesterday. It was indeed very simple
Avatar
Anonymous 28-Jul-20 09:00 AM
@Anonymous Fitter you're most welcome
👍 1
Avatar
Anonymous 28-Jul-20 09:16 AM
I am not able to upload my grades for lab1b, please help
Avatar
Anonymous 28-Jul-20 09:21 AM
I am not able to upload my grades for lab1b, please help
@Anonymous Singh This has been occuring since yesterday, they are working on it. A few minutes ago I was able to upload. I believe this issue has to do with a race condition on the server (i.e. the server is overloaded and cannot validate your answer before sending a response to you). Give it time and don't overload it.
Avatar
Anonymous 28-Jul-20 09:22 AM
Erase the cache and commenting the third one and restarting and running all over again works for me (edited)
Avatar
Anonymous 28-Jul-20 10:11 AM
Erase the cache and commenting the third one and restarting and running all over again work for me
@Anonymous did it take so long? mine is grading like since 5 minutes ago
Avatar
Anonymous 28-Jul-20 10:19 AM
I keep getting this error when trying to run lab6 on mac os in a jupyter notebook. "A process in the process pool was terminated abruptly while the future was running or pending." It appears after running the line" rabi_result = backend_sim.run(rabi_qobj, duffing_model).result()". I've done some searching and it seems that the error is caused by something going wrong in the parallelization of something in Qiskit's simulation function. Because of this I'm unable to compute the value for "drive_period" to perform lab6B. Is there a workaround for this? Or could someone possibly just give their value for the drive_period?
Avatar
Anonymous 28-Jul-20 10:23 AM
I keep getting this error when trying to run lab6 on mac os in a jupyter notebook. "A process in the process pool was terminated abruptly while the future was running or pending." It appears after running the line" rabi_result = backend_sim.run(rabi_qobj, duffing_model).result()". I've done some searching and it seems that the error is caused by something going wrong in the parallelization of something in Qiskit's simulation function. Because of this I'm unable to compute the value for "drive_period" to perform lab6B. Is there a workaround for this? Or could someone possibly just give their value for the drive_period?
@Anonymous McGaha For those running into a lab 6 issue with the following error (Most likely if you're running on Mac OS): BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending. Change the first line of the code block to !pip install -U -r grading_tools/requirements_nowin.txt Credits to @Anonymous
👍 1
Avatar
Anonymous 28-Jul-20 10:25 AM
@Anonymous it's been 20 mins now for me.
Avatar
Anonymous 28-Jul-20 10:26 AM
OMG
I restarted it, not patience ahah
😂 1
Avatar
Anonymous 28-Jul-20 10:27 AM
XD
Avatar
Anonymous 28-Jul-20 10:42 AM
@Anonymous Thanks I'll give it a shot!
Avatar
Anonymous 28-Jul-20 10:56 AM
What does it mean for Lab6/ex1b? incorrect or failed to submit?
Avatar
Anonymous 28-Jul-20 10:58 AM
@Anonymous failed to submit
Avatar
Anonymous 28-Jul-20 11:02 AM
What does it mean for Lab6/ex1b? incorrect or failed to submit?
@Anonymous many people are getting this error, it's a server error, just keep resubmitting
Avatar
Anonymous 28-Jul-20 11:06 AM
thanks !
@Anonymous Sourounis @Anonymous thanks
Avatar
Anonymous 28-Jul-20 11:10 AM
anyone got some suggestions how I could fix the "can not import helper" issue?
commenting out the server in grade.py didn't work
Avatar
Anonymous 28-Jul-20 11:11 AM
anyone got some suggestions how I could fix the "can not import helper" issue?
@Anonymous what's the exact error? not sure what "helper" is
also if you commented the server line out, you need to restart the kernel again (edited)
Avatar
Anonymous 28-Jul-20 11:13 AM
I did restart the kernel after commenting out the server. Still didn't help
Avatar
Anonymous 28-Jul-20 11:13 AM
this should be in your resources folder
Avatar
Anonymous 28-Jul-20 11:14 AM
^Thats all there
Avatar
Anonymous 28-Jul-20 11:14 AM
this is the directory where you are running your jupyter notebook
Avatar
Anonymous 28-Jul-20 11:15 AM
these are all the files I got
the resources file with the helper.py is all there but it still can not be imported
In the error message the path ends with init.py
I don't know whether thats correct
shouldn't it say helper.py there, as that is the file whose functions we want to import
Avatar
Anonymous 28-Jul-20 11:35 AM
lab2/ex1 - 🎉 Correct 🎊 Hurray! You have a new correct answer! Let's submit it. Submitting the answers for lab2... 📝 Our records, so far, are: Correct answers: lab1:ex1, lab2:ex1
Hello, after running the last cell I get this output. Does that mean that I have passed the lab? Do I need to do anything else for confirmation? Sorry for such a novice question.
Avatar
Anonymous 28-Jul-20 11:36 AM
Hello, after running the last cell I get this output. Does that mean that I have passed the lab? Do I need to do anything else for confirmation? Sorry for such a novice question.
@Anonymous Yep, you're all set, and woo hoo 🥳 🎉 🎊
Avatar
Anonymous 28-Jul-20 11:36 AM
@Anonymous Yep, you're all set, and woo hoo 🥳 🎉 🎊
@Anonymous aah thanks!
Avatar
Anonymous 28-Jul-20 11:39 AM
I am getting this error in lab 6 anyone who can help me?
Avatar
Anonymous 28-Jul-20 11:40 AM
we all are facing same error
waiting for officials to give some solution
👍 2
Avatar
Anonymous 28-Jul-20 12:00 PM
shouldn't it say helper.py there, as that is the file whose functions we want to import
@Anonymous in my folder (lab6) I don't have a init.py. The init file is only inside grading_tools/. Can you navigate to the path shown in your error (.../lib/.../reosurces/)? It seems that you are importing something from the python files, and not from the local files in lab6/
Avatar
Anonymous 28-Jul-20 12:06 PM
Hi, someone has this message? I don´t understand what is meaning ...
Avatar
Anonymous 28-Jul-20 12:07 PM
@Anonymous The fix is this: Change the first line of code to !pip install -U -r grading_tools/requirements_nowin.txt Restart the kernel and rerun everything
Avatar
Anonymous 28-Jul-20 12:11 PM
@Anonymous McGaha thank you!!
Avatar
Anonymous 28-Jul-20 12:15 PM
@Anonymous You can thank @Anonymous and @Anonymous . Just relaying their information
🥳 1
I had the same issue and spent quite a while trying to figure it out
Avatar
Anonymous 28-Jul-20 12:17 PM
@Anonymous So i just figured out how to get around the non-submitting problem. If you go back and change your answer so it's incorrect and then submit it, it will register as incorrect and commit. If you then correct it and resubmit, it gets committed with the correct answer.
(This is not for lab 6, in case anyone is wondering. I was having with a lab from last week that hadn't been submitted for some reason)
Avatar
Anonymous 28-Jul-20 12:26 PM
For #lab6 I am getting the above error
while running the simulation
Avatar
Anonymous 28-Jul-20 12:27 PM
👍 1
Avatar
Anonymous 28-Jul-20 12:28 PM
ok great
I am using Mac
will check that
Avatar
Anonymous 28-Jul-20 12:28 PM
Is everything alright with my submissions ? Because I read somewhere that I needed to receive an ✅ mark, but this never shown up to me.
Avatar
Anonymous 28-Jul-20 12:30 PM
Is everything alright with my submissions ? Because I read somewhere that I needed to receive an ✅ mark, but this never shown up to me.
@Anonymous Motta Lab 5 is submitted, so you're all set 🥳
Avatar
Anonymous 28-Jul-20 12:31 PM
Thank you! hahaha
Avatar
Anonymous 28-Jul-20 12:46 PM
Getting error like this while excuting grade column
Avatar
Anonymous 28-Jul-20 12:47 PM
check if u've grading_tools folder?
@Anonymous
Avatar
Anonymous 28-Jul-20 12:48 PM
Getting error like this while excuting grade column
@Anonymous Make sure your directory looks like this 🙂 (edited)
Avatar
Anonymous 28-Jul-20 12:53 PM
It looks like that only
Avatar
Anonymous 28-Jul-20 12:54 PM
The meaning of this error?, I need to change something? Thanks for your help.
Avatar
Anonymous 28-Jul-20 12:55 PM
Finally, I successfully submitted lab6
👍 1
Avatar
Anonymous 28-Jul-20 12:55 PM
In lab6 notebook there is a typo here
Avatar
Anonymous 28-Jul-20 12:55 PM
Finally, I successfully submitted lab6
@Anonymous U Woo hoo! 🎉 🎊 😍
👍 3
qiskitsmart 1
Avatar
Anonymous 28-Jul-20 12:56 PM
@Anonymous U Any tips? 😩
Avatar
Anonymous 28-Jul-20 12:56 PM
@Anonymous U , How could you that? I have a message about something wrong with
Avatar
Anonymous 28-Jul-20 12:56 PM
I still cannot submit it :_:
@Anonymous U , How could you that? I have a message about something wrong with
@Anonymous Yeah, me too, I've tried the tips above and still I cannot submit it
Avatar
Anonymous 28-Jul-20 12:57 PM
@Anonymous I had the same message, I tried many times
Avatar
Anonymous 28-Jul-20 12:58 PM
@Anonymous @Anonymous You just gotta keep resubmitting 🙂
Avatar
Anonymous 28-Jul-20 12:58 PM
It worked without tricks
Avatar
Anonymous 28-Jul-20 12:58 PM
The mentors are trying to figure out the issue, and they'll keep you updated with an official solution 🙂 (edited)
Avatar
Anonymous 28-Jul-20 12:59 PM
I commented the third server and takes forever to grade, by commenting the second one, just keeps saying that 422 Client Error
➕ 1
Avatar
Anonymous 28-Jul-20 01:00 PM
Avatar
Anonymous 28-Jul-20 01:00 PM
@Anonymous I just tried many times, no tricks
Avatar
Anonymous 28-Jul-20 01:02 PM
okay, i'll try more and see what happens
thanks
👍 1
Avatar
Anonymous BOT 28-Jul-20 01:33 PM
Day 6 Lecture: https://www.crowdcast.io/e/qgss-day6 / password: qiskitday6 Lecture Notes: https://discordapp.com/channels/729706617951485954/729710164546027629/737469652166508635 Day 7 Lecture: https://www.crowdcast.io/e/qgss-day7 / password: qiskitday7 Lecture Notes: Coming Soon! For Week 1 (Day 1-5) lecture links, enter command !lastweek
Avatar
Anonymous 28-Jul-20 01:59 PM
does this mean my answer is wrong?
Avatar
Anonymous 28-Jul-20 02:00 PM
No, keep retrying it!
Avatar
Anonymous 28-Jul-20 02:00 PM
okay
Avatar
Anonymous 28-Jul-20 02:03 PM
i'm trying
but no help
Avatar
Anonymous 28-Jul-20 02:07 PM
never give up all.... 👍
😊 1
Avatar
Anonymous 28-Jul-20 02:09 PM
whats the point
im already off schedule
Avatar
Anonymous 28-Jul-20 02:12 PM
everyone's been submitting so the server is like
🤣 5
Avatar
Anonymous 28-Jul-20 02:12 PM
that was funny
🎉 2
Avatar
Anonymous 28-Jul-20 02:14 PM
@Anonymous issue submitting lab6?
Avatar
Anonymous 28-Jul-20 02:14 PM
yup🥺
Avatar
Anonymous 28-Jul-20 02:15 PM
can you please post the error you're getting..
Avatar
Anonymous 28-Jul-20 02:15 PM
the same as all
Avatar
Anonymous 28-Jul-20 02:17 PM
hey, it just worked with me, try to follow the suggestions everyone said above, comment 1a and rerun 1b a couple of times
👍 2
Avatar
Anonymous 28-Jul-20 02:17 PM
@Anonymous sorry.. the 422 one on salvador..gonzalez.. server?
Avatar
Anonymous 28-Jul-20 02:18 PM
hey, it just worked with me, try to follow the suggestions everyone said above, comment 1a and rerun 1b a couple of times
@Anonymous what
please explain
Avatar
Anonymous 28-Jul-20 02:18 PM
everyone's been submitting so the server is like
@Anonymous yes 😅 😭
Avatar
Anonymous 28-Jul-20 02:18 PM
does this mean my answer is wrong?
@Anonymous
grade(answer1b, name, email, 'lab6', 'ex1b', server = 'https://salvadelapuente.com:8088')
try changing like this
I had same problem and solved with this (edited)
Avatar
Anonymous 28-Jul-20 02:25 PM
@Anonymous How do you do? Comment this line ...
Avatar
Anonymous 28-Jul-20 02:27 PM
@Anonymous To comment a line type a '#' at the beginning. Everything after that character will not be evaluated
Avatar
Anonymous 28-Jul-20 02:27 PM
@Anonymous How do you do? Comment this line ...
@Anonymous Basically the link in the server thing is one of the servers sorted in grade.py, you are sending your code only to this server instead of sending others
Avatar
Anonymous 28-Jul-20 02:28 PM
I have a question about Lab 4 on factoring 15. In the lecture, Abe initialized the m target qubits to be in the 00...0 state. In the Review part of the lab, however, the target qubits are initialized to the state |1> (meaning 00...01?). What is the difference in the two settings so that different initial states are used?
Avatar
Anonymous 28-Jul-20 02:28 PM
@Anonymous How do you do? Comment this line ...
@Anonymous %grade(answer1a, name, email, 'lab6')
Avatar
Anonymous 28-Jul-20 02:30 PM
@Anonymous What are the effects of sending the grade to only the one server? Will it work like normal?
Avatar
Anonymous 28-Jul-20 02:35 PM
@Anonymous What are the effects of sending the grade to only the one server? Will it work like normal?
@Anonymous There seemed no problem, it was showing all exercises were correct
Avatar
Anonymous 28-Jul-20 02:40 PM
@Anonymous Thanks. I am trying it now, but it is taking some time
I did both. I believe they function independently. So it wont hurt anything to comment 1a, just less work for the server
Avatar
Anonymous 28-Jul-20 02:49 PM
I tried specifying the server and it has been grading for about an hour 😦
Avatar
Anonymous 28-Jul-20 02:50 PM
@Anonymous me too 😦
Avatar
Anonymous 28-Jul-20 02:50 PM
me too
Avatar
Anonymous 28-Jul-20 02:50 PM
same here
Avatar
Anonymous 28-Jul-20 02:51 PM
they just said that its server issue
Avatar
Anonymous 28-Jul-20 02:51 PM
@Anonymous
Avatar
Anonymous 28-Jul-20 02:51 PM
@Anonymous Hi Is there going to be a forum for the project work? I was hoping that someone would shed some light on it?
Avatar
Anonymous 28-Jul-20 02:51 PM
and their server is running just fine
Avatar
Anonymous 28-Jul-20 02:51 PM
Same here
Avatar
Anonymous 28-Jul-20 02:51 PM
but they wont give us some solution
Avatar
Anonymous 28-Jul-20 02:51 PM
Avatar
Anonymous 28-Jul-20 02:55 PM
Did anyone finish lab 6 guys I am confused about where to look for explanations?
about rabi schedule
Avatar
Anonymous 28-Jul-20 02:58 PM
Did anyone finish lab 6 guys I am confused about where to look for explanations?
@Anonymous Tried the qiskit textbook?
Avatar
Anonymous 28-Jul-20 02:58 PM
@Anonymous No I have not! Thanks
Avatar
Anonymous 28-Jul-20 02:58 PM
@Anonymous No I have not! Thanks
@Anonymous Section 6.1
👍🏻 2
Avatar
Anonymous 28-Jul-20 03:09 PM
no lab yet?
Avatar
Anonymous 28-Jul-20 03:11 PM
we havent submitted the previous one you asking for a new one
Avatar
Anonymous 28-Jul-20 03:12 PM
but they wont give us some solution
@Anonymous They should give us another way to submit the lab
Avatar
Anonymous 28-Jul-20 03:14 PM
Did someone had troubles running the backend.retrieve.job command in the lab6-drive-ham-rabi-ramsey file?
Avatar
Anonymous 28-Jul-20 03:16 PM
Did someone had troubles running the backend.retrieve.job command in the lab6-drive-ham-rabi-ramsey file?
@Anonymous That is not supposed to be your job. Only Nick should be able to retrieve that job
Avatar
Anonymous 28-Jul-20 03:18 PM
@Anonymous That is not supposed to be your job. Only Nick should be able to retrieve that job
@Anonymous Thank you. Do you know how to access to my last job id?
Avatar
Anonymous 28-Jul-20 03:21 PM
@Anonymous Thank you. Do you know how to access to my last job id?
@Anonymous Not sure what you are referring to. The job_id here does not relate to the lab. Don't worry about it. If you really feel like running a job on an actual machine, why don't you uncommnet the things above, in the same block. You should see an id been printed. Then use that id to retrieve the job you do. But remember, DO NOT submit too many jobs. It will make you queue a very long time and may even cause you get stuck in the queue.
Avatar
Anonymous 28-Jul-20 03:22 PM
@Anonymous Not sure what you are referring to. The job_id here does not relate to the lab. Don't worry about it. If you really feel like running a job on an actual machine, why don't you uncommnet the things above, in the same block. You should see an id been printed. Then use that id to retrieve the job you do. But remember, DO NOT submit too many jobs. It will make you queue a very long time and may even cause you get stuck in the queue.
@Anonymous Thank you for the insight!
Avatar
Anonymous 28-Jul-20 03:22 PM
@Anonymous That is not supposed to be your job. Only Nick should be able to retrieve that job
@Anonymous Uncomment the first few lines and comment out job = backend.retrieve...
Avatar
Anonymous 28-Jul-20 03:22 PM
@Anonymous They should give us another way to submit the lab
@Anonymous ya. or if not take the ex1 file then evaluate it by themself
or maybe place us in a queue or somthing
Avatar
Anonymous 28-Jul-20 03:24 PM
Did someone had troubles running the backend.retrieve.job command in the lab6-drive-ham-rabi-ramsey file?
@Anonymous Also need to load in your API 🙂 (edited)
qiskitwhite 1
Avatar
Anonymous 28-Jul-20 03:26 PM
@Anonymous
@Anonymous no
Avatar
Anonymous 28-Jul-20 03:30 PM
Hmm, I got it to run, just gotta wait 🙂
And now it's done, and I can move on to the next cell block 🙂
Avatar
Anonymous 28-Jul-20 03:38 PM
is there no lab7 ?
Avatar
Anonymous 28-Jul-20 03:38 PM
not yet 🙂
Avatar
Anonymous 28-Jul-20 03:42 PM
Hmm, I got it to run, just gotta wait 🙂
@Anonymous thank you, pretty useful
👍 1
Avatar
Anonymous 28-Jul-20 03:59 PM
Am I the only one still unable to grade my lab6 ex1b?
Avatar
Anonymous 28-Jul-20 03:59 PM
Am I the only one still unable to grade my lab6 ex1b?
@Anonymous nope there's many with that grading error (edited)
👍 3
Avatar
Anonymous 28-Jul-20 04:13 PM
Avatar
Anonymous 28-Jul-20 04:15 PM
umm... are the files right?
It came with the solution and I don't see the grading code in either
Avatar
Anonymous 28-Jul-20 04:19 PM
and we dont have a grader
Avatar
Anonymous 28-Jul-20 04:19 PM
In lab6 notebook there is a typo here
@Anonymous This is not a typo, the signs are reversed for qubit raising/lowering operators vs spin raising/lowering operators (because the up spin is the ground state when you have a magnetic field in the +z-direction).
Avatar
Anonymous 28-Jul-20 04:21 PM
@Anonymous This is not a typo, the signs are reversed for qubit raising/lowering operators vs spin raising/lowering operators (because the up spin is the ground state when you have a magnetic field in the +z-direction).
@Anonymous bronn thank you, I'm so sorry, I was mixing things with the spin operators
Avatar
Anonymous 28-Jul-20 04:23 PM
Don't worry about it, @Anonymous It confused Zlatko and I for awhile when we were making these
💯 1
Avatar
Anonymous 28-Jul-20 04:23 PM
@Anonymous and @Anonymous - this is mentioned in the instructions
Avatar
Anonymous 28-Jul-20 04:24 PM
It came with the solution and I don't see the grading code in either
@Anonymous Everyone gets credit for Lab 7!
Avatar
Anonymous 28-Jul-20 04:31 PM
@Anonymous Everyone gets credit for Lab 7!
@Anonymous bronn Sanity check ✅
Avatar
Anonymous 28-Jul-20 04:32 PM
@Anonymous nope there's many with that grading error
@Anonymous Is this resolved ?
Avatar
Anonymous 28-Jul-20 04:34 PM
@Anonymous and @Anonymous - this is mentioned in the instructions
@Anonymous sorry 😅
Avatar
Anonymous 28-Jul-20 04:35 PM
@Anonymous bronn Hi Nick... are the mentors on the crowdcast site too.. in case there are specific (time-stamped) questions on the lab demo... or are those to be directed here
Avatar
Anonymous 28-Jul-20 04:38 PM
@Anonymous I think I saw some of them there, but I have only been answering questions in the discord
Avatar
Anonymous 28-Jul-20 04:41 PM
@Anonymous bronn Was the grading issue for Lab 6 addressed?
Avatar
Anonymous 28-Jul-20 04:43 PM
@Anonymous I think I saw some of them there, but I have only been answering questions in the discord
@Anonymous bronn OK. I had a question from your lab demo notebook yesterday, and I was trying to run the notebook... obviously, I had run my own job before proceeding further, but I got a waveform like this (below). And although I tried to see what could have gone wrong, I just could not get it to look like you semi sinusoidal one. Any idea what's going on? (edited)
Avatar
Anonymous 28-Jul-20 04:44 PM
does this mean my answer is wrong?
@Anonymous was this problem solved? got the same
Avatar
Anonymous 28-Jul-20 04:45 PM
@Anonymous bronn Was the grading issue for Lab 6 addressed?
@Anonymous I think some folks are still having an issue.... I wrote in a server = keyword in the grade command.
Avatar
Anonymous 28-Jul-20 04:45 PM
@Anonymous
@Anonymous bronn OK. I had a question from your lab demo notebook yesterday, and I was trying to run the notebook... obviously, I had run my own job before proceeding further, but I got a waveform like this (below). And although I tried to see what could have gone wrong, I just could not get it to look like you semi sinusoidal one. Any idea what's going on?
@Anonymous I got the same waveform
Avatar
Anonymous 28-Jul-20 04:46 PM
@Anonymous bronn Shall go ahead and do that?
Avatar
Anonymous 28-Jul-20 04:50 PM
@Anonymous bronn OK. I had a question from your lab demo notebook yesterday, and I was trying to run the notebook... obviously, I had run my own job before proceeding further, but I got a waveform like this (below). And although I tried to see what could have gone wrong, I just could not get it to look like you semi sinusoidal one. Any idea what's going on?
@Anonymous Are you running this on Armonk with the same pulse built for the Duffing model?
Avatar
Anonymous 28-Jul-20 04:52 PM
@Anonymous Are you running this on Armonk with the same pulse built for the Duffing model?
@Anonymous bronn
I do not recall changing anything.
Avatar
Anonymous 28-Jul-20 04:53 PM
@Anonymous was this problem solved? got the same
@Anonymous No I couldn't grade it till now. My answer is correct so something is wrong with the server
Avatar
Anonymous 28-Jul-20 04:54 PM
@Anonymous Are you running this on Armonk with the same pulse built for the Duffing model?
@Anonymous bronn I had the same situation as @Anonymous and I did not modify anything, other than executing my own job
Avatar
Anonymous 28-Jul-20 04:54 PM
Can any mentor check into this problem?
Avatar
Anonymous 28-Jul-20 04:54 PM
cannot import name 'helper' from 'resources'
can anyone help with this error? i wasn't able to submit lab6 due to the same error
Avatar
Anonymous 28-Jul-20 04:55 PM
@Anonymous bronn This is what I am getting: HTTPError: 422 Client Error: Unprocessable Entity for url: https://eu-gb.functions.cloud.ibm.com/api/v1/web/salvador.de.la.puente.gonzalez%40ibm.com_dev/default/qgss_grading/commit-answers
Avatar
Anonymous 28-Jul-20 04:57 PM
@Anonymous bronn This is what I am getting: HTTPError: 422 Client Error: Unprocessable Entity for url: https://eu-gb.functions.cloud.ibm.com/api/v1/web/salvador.de.la.puente.gonzalez%40ibm.com_dev/default/qgss_grading/commit-answers
@Anonymous Exactly same
Avatar
Anonymous 28-Jul-20 04:57 PM
What is wrong here lab 6 1b, I got fail grade
Avatar
Anonymous 28-Jul-20 04:58 PM
What is wrong here lab 6 1b, I got fail grade
@Anonymous hey what's the error?
Avatar
Anonymous 28-Jul-20 04:59 PM
Avatar
Anonymous 28-Jul-20 04:59 PM
@Anonymous @Anonymous many people are getting this error, mentors are looking into this error 🙂
Avatar
Anonymous 28-Jul-20 05:00 PM
Okay
Avatar
Anonymous 28-Jul-20 05:00 PM
abe said last night just to keep resubmitting, some of us were able to get it graded after several tries 🙂
Avatar
Anonymous 28-Jul-20 05:00 PM
ok thanks
Avatar
Anonymous 28-Jul-20 05:02 PM
@Anonymous @Anonymous many people are getting this error, mentors are looking into this error 🙂
@Anonymous Nothing found yet?
Avatar
Anonymous 28-Jul-20 05:05 PM
if you look in #support-reference, a mentor is currently looking into the issue 🙂
maybe you guys can ask him 😄
Avatar
Anonymous 28-Jul-20 05:07 PM
I tried uploading the same code couple times and worked in the 3rd attempt. Not quite sure about the nature of the error but worked to me without editing further on the code.
@Anonymous Nothing found yet?
@Anonymous
Avatar
Anonymous 28-Jul-20 05:08 PM
I tried uploading the same code couple times and worked in the 3rd attempt. Not quite sure about the nature of the error but worked to me without editing further on the code. @Anonymous
@Anonymous Yayyyyy 🎉 🎊 🥳
😋 1
Avatar
Anonymous 28-Jul-20 05:11 PM
@Anonymous bronn I had the same situation as @Anonymous and I did not modify anything, other than executing my own job
@Anonymous I believe the problem was I used pulse parameters for another device, but then ended up pulling the previous results from Armonk. Change drive_sigma to 320 (from 80) and you should be able to see the full Rabi oscillation.
👍 1
Avatar
Anonymous 28-Jul-20 05:12 PM
so there is no grading today is that correct? (edited)
or am i missing something
Avatar
Anonymous 28-Jul-20 05:17 PM
To all graduate students out there (in CS/ Quantum hopefully?), I have an assignment for a class where I need to schedule an informational interview with a graduate student in a field I'm interested in. If anyone would be interested in this in the next month, please DM me! I figured this would be the best place to find some people I could interview about their time in a graduate problem 🙂
Avatar
Anonymous 28-Jul-20 05:21 PM
@Anonymous I believe the problem was I used pulse parameters for another device, but then ended up pulling the previous results from Armonk. Change drive_sigma to 320 (from 80) and you should be able to see the full Rabi oscillation.
@Anonymous bronn Yeah! I see the full Rabi oscillation now! Thank you very much
Avatar
Anonymous 28-Jul-20 05:23 PM
@Anonymous I believe the problem was I used pulse parameters for another device, but then ended up pulling the previous results from Armonk. Change drive_sigma to 320 (from 80) and you should be able to see the full Rabi oscillation.
@Anonymous bronn Thanks for the hint! It did work for me at last! But now I have a follow up... How do we explain the almost pi phase change between the two situations at the starting value? I would have expected the fuller waveform, but starting at the same initial phase -- do we also change initial phase by altering drive sigma?
Avatar
Anonymous 28-Jul-20 05:24 PM
who got this error from lab7 lab7-jc-spect-readout jupyter
Avatar
Anonymous 28-Jul-20 05:24 PM
@Anonymous bronn Yeah! I see the full Rabi oscillation now! Thank you very much
@Anonymous Great! That is because armonk is less coupled that the other device I was using in the original notebook. Therefore you need to drive it harder to see the Rabi oscillations.
👍 1
Avatar
Anonymous 28-Jul-20 05:25 PM
who got this error from lab7 lab7-jc-spect-readout jupyter
@Anonymous hey, comment that line out, and uncomment the lines above 🙂
that job id isn't yours
you'll also need to put in your API token using IBMQ.save_account('APIToken')
the same way as lab 5
Avatar
Anonymous 28-Jul-20 05:26 PM
i see i tried to change it
but not work so i will comment it
thanks
Avatar
Anonymous 28-Jul-20 05:29 PM
@Anonymous bronn Thanks for the hint! It did work for me at last! But now I have a follow up... How do we explain the almost pi phase change between the two situations at the starting value? I would have expected the fuller waveform, but starting at the same initial phase -- do we also change initial phase by altering drive sigma?
@Anonymous I might be a little confused by what you mean, but let me try and answer: changing the drive sigma changes the length of the drive pulse because the drive_duration is dependent on it. The phase of the waveform should stay the same, but you might be referring to the phase of the sinusoid as a function of drive amp? In this case, they vary between devices because of the different g value in the Jaynes-Cummings Hamiltonian (which is done by design).
👍 2
Avatar
Anonymous 28-Jul-20 05:32 PM
@Anonymous I might be a little confused by what you mean, but let me try and answer: changing the drive sigma changes the length of the drive pulse because the drive_duration is dependent on it. The phase of the waveform should stay the same, but you might be referring to the phase of the sinusoid as a function of drive amp? In this case, they vary between devices because of the different g value in the Jaynes-Cummings Hamiltonian (which is done by design).
@Anonymous bronn Thanks... actually that was it. I was actually going through my old notes on the J-C Hamiltonian and also the review article from Will Oliver's group to understand the role of the drive coupling a bit more. (edited)
Avatar
Anonymous 28-Jul-20 05:34 PM
@Anonymous bronn Thanks... actually that was it. I was actually going through my old notes on the J-C Hamiltonian and also the review article from Will Oliver's group to understand the role of the drive coupling a bit more.
@Anonymous Okay cool. You can also thing of the coupling g between the resonator and qubit is similar to the Omega (strength of the drive) in Lab 6. They are related and dependent on which one is sharing the "dipole interaction" with the qubit.
Avatar
Anonymous 28-Jul-20 05:35 PM
Thanks @Anonymous bronn . Will do! BTW, do you know anything about the project business at the end of this school? No word on it yet?
Avatar
Anonymous 28-Jul-20 05:36 PM
Thanks @Anonymous bronn . Will do! BTW, do you know anything about the project business at the end of this school? No word on it yet?
@Anonymous Sorry I am not privy to such things!
Avatar
Anonymous 28-Jul-20 05:36 PM
Np! Thanks for clarifying matters! Spent a few hours into the night trying to figure that one out 😅 (edited)
Avatar
Anonymous 28-Jul-20 05:43 PM
i see i tried to change it
@Anonymous when i did this, it runs, just gotta wait a bit 🙂
Avatar
Anonymous 28-Jul-20 06:09 PM
Guys in lab 6 ex2, does the problem persists ?
because a server error is being returned
Avatar
Anonymous 28-Jul-20 06:13 PM
@Anonymous bronn In Qiskit, the amplitudes are given in terms of a.u. How is a.u. defined?
Avatar
Anonymous 28-Jul-20 06:14 PM
Guys in lab 6 ex2, does the problem persists ?
@Anonymous Yeah , still getting the client error 422.
👍 3
Avatar
Anonymous 28-Jul-20 06:16 PM
@Anonymous bronn In Qiskit, the amplitudes are given in terms of a.u. How is a.u. defined?
@Anonymous The amplitude are a scaling factor < 1, but the specific amount of energy delivered will depend on the maximum output voltage of the waveform generators, power of the radio frequency synthesizers, and other amplification/attenuation caused by amplifiers/attenuators/mixers/etc.
👍 1
Avatar
Anonymous 28-Jul-20 06:17 PM
Hey @Anonymous bronn , is it a server problem because of which ex6 (b) is not getting submitted ? (edited)
Avatar
Anonymous 28-Jul-20 06:19 PM
as it seems yes!
Avatar
Anonymous 28-Jul-20 06:21 PM
Thank you @Anonymous bronn
Avatar
Anonymous 28-Jul-20 06:29 PM
I don't have luck ahahha
Avatar
Anonymous 28-Jul-20 06:45 PM
Is there no turn-in script for lab7? I can't find the turn-in script in the exercise file, nor the solution file.
Avatar
Anonymous 28-Jul-20 06:52 PM
Is there no turn-in script for lab7? I can't find the turn-in script in the exercise file, nor the solution file.
@Anonymous https://discordapp.com/channels/729706617951485954/732633353471393853/737767357065330748
👍 2
Avatar
Anonymous 28-Jul-20 07:13 PM
copy old script and change to lab7: from grading_tools import grade grade(answer1, name, email, 'lab7', 'ex1')
Avatar
Anonymous 28-Jul-20 07:17 PM
@Anonymous now I need to know if you actually tried that
👀 1
Avatar
Anonymous 28-Jul-20 07:19 PM
copy old script and change to lab7: from grading_tools import grade grade(answer1, name, email, 'lab7', 'ex1')
@Anonymous you don't need to do this at all 🙂
Avatar
Anonymous 28-Jul-20 07:26 PM
In the rabi experiment, why do we have to create a gaussian pulse? Why can't the pulse be, for example, a squared pulse? I'm not really grasping what a gaussian pulse means, is it some sort of wave packet with a gaussian envelope of microwaves?
❓ 2
Avatar
Anonymous BOT 28-Jul-20 07:26 PM
Your hand has been raised! A mentor will drop in as soon as they are available.
Avatar
Anonymous 28-Jul-20 08:27 PM
I was up until 4am trying to submit Lab 6b and all day today. Trying . . . try again . . . over and over . . . no luck. I think I have at least 20 hours into trying to submit this lab. Same error as everyone else: 422 Client Error: Unprocessable Entity for url: I think I need to apply Einstein's comment as he said "The definition of insanity is doing the same thing over and over again, but expecting different results." Please call the men with the long-armed white jackets to come take me away. (edited)
😩 8
Avatar
Anonymous 28-Jul-20 08:49 PM
Will the submission of the final project count towards community contribution for the qiskit advocate application?
Avatar
Anonymous 28-Jul-20 09:08 PM
I was up until 4am trying to submit Lab 6b and all day today. Trying . . . try again . . . over and over . . . no luck. I think I have at least 20 hours into trying to submit this lab. Same error as everyone else: 422 Client Error: Unprocessable Entity for url: I think I need to apply Einstein's comment as he said "The definition of insanity is doing the same thing over and over again, but expecting different results." Please call the men with the long-armed white jackets to come take me away.
@Anonymous Parry i feel u, me too
@Anonymous you don't need to do this at all 🙂
@Anonymous It says its wrong even when I have the same answer as the solution file, why?
Avatar
Anonymous 28-Jul-20 09:13 PM
@Anonymous Parry I admire your determination, but it’s not an issue on your side. There’s something wrong with the servers, and the mentors are looking into it.
Avatar
Anonymous 28-Jul-20 09:13 PM
@Anonymous It says its wrong even when I have the same answer as the solution file, why?
@Anonymous Lab 7 isn't supposed to be graded 😂
It's a freebie, everyone get points for it 🙂
Avatar
Anonymous 28-Jul-20 09:13 PM
To quote the Hitchhiker’s Guide to the Galaxy: don’t panic
Avatar
Anonymous 28-Jul-20 09:15 PM
It's a freebie, everyone get points for it 🙂
@Anonymous oh, I though you said it seriously, that's why I did it ahaha
Avatar
Anonymous 28-Jul-20 09:16 PM
Wait what, I lost track of which convo I said what 😂
Avatar
Anonymous 28-Jul-20 09:17 PM
oh yes
ahahaa
It was another person
Avatar
Anonymous 28-Jul-20 09:18 PM
lol 😂
Avatar
Anonymous 28-Jul-20 09:20 PM
Good night
Avatar
Anonymous 28-Jul-20 09:21 PM
In the rabi experiment, why do we have to create a gaussian pulse? Why can't the pulse be, for example, a squared pulse? I'm not really grasping what a gaussian pulse means, is it some sort of wave packet with a gaussian envelope of microwaves?
@Anonymous You could absolutely do another pulse shape for the Rabi experiment. We like the Gaussian because the frequency is well behaved (and also Gaussian), whereas you could get other undesired spectral content when using another pulse (such as square).
💯 1
Avatar
Anonymous 28-Jul-20 09:21 PM
It seems like the server issues about lab #6 hasn't been solved, have they?
Avatar
Anonymous 28-Jul-20 09:21 PM
@Anonymous bronn Sorry, I have another naive question: given some initial state of the qubit, should we regard a pulse as a time-dependent perturbation? And the analysis in lab 6 is based on first-order perturbation theory?
Avatar
Anonymous 28-Jul-20 09:22 PM
It seems like the server issues about lab #6 hasn't been solved, have they?
@Anonymous No, it's a nightmare
Avatar
Anonymous 28-Jul-20 09:23 PM
Hey @Anonymous bronn , is it a server problem because of which ex6 (b) is not getting submitted ?
@Anonymous I believe that is the case from discussion in other channels, such as #supportlabs. I do not know what is going on in the backend 🙁
👍 1
Avatar
Anonymous 28-Jul-20 09:25 PM
@Anonymous No, it's a nightmare
@Anonymous That's a quite interesting depiction of the current situation
Avatar
Anonymous 28-Jul-20 09:27 PM
I wouldn't say its a nightmare. Just a minor inconvenience. (edited)
Avatar
Anonymous 28-Jul-20 09:29 PM
I get your point, but that server issue triggers my anxiety. I'm worried about not being able of submitting the remaining labs
Avatar
Anonymous 28-Jul-20 09:29 PM
You have until August 2nd though 🙂 (edited)
Hopefully the server will be less busy 😊
Avatar
Anonymous 28-Jul-20 09:32 PM
Hopefully the server will be less busy 😊
@Anonymous
Avatar
Anonymous 28-Jul-20 09:32 PM
@Anonymous bronn Sorry, I have another naive question: given some initial state of the qubit, should we regard a pulse as a time-dependent perturbation? And the analysis in lab 6 is based on first-order perturbation theory?
@Anonymous The lab 6 analysis is based on rotating-wave approximation, which says that fast-oscillating signals don't contribute much. I don't think perturbation theory works here, because the energy of the photon is roughly that of the drive. However, the S-W transformation in Lab 7 is very similar to perturbation theory.
Avatar
Anonymous 28-Jul-20 09:32 PM
Avatar
Anonymous 28-Jul-20 09:33 PM
Sad meme seems not to be effective xD
doesn't seem**
Avatar
Anonymous 28-Jul-20 09:33 PM
heheheh 😛
Avatar
Anonymous 28-Jul-20 09:44 PM
@Anonymous I don't think perturbation theory works here,
@Anonymous bronn So the idea is to compute exactly (using the RWA-Hamiltonian) the time-evolution operator corresponding to the pulses? Where could I find the details worked out, especially for the Ramsey measurement?
Avatar
Anonymous BOT 28-Jul-20 09:46 PM
Lecture and Lecture Note Links: Week 2 All lecture notes are available in #resources - check the pinned files! Day 6: Superconducting Qubits I: Quantizing a Harmonic Oscillator, Josephson Junctions Lecturer : Zlatko Minev Recording : https://www.crowdcast.io/e/qgss-day6 Password : qiskitday6 Day 7: Superconducting Qubits II: Readout and Circuit QED, Calibrating a Qubit Frequency and Readout Lecturer : Zlatko Minev Recording : https://www.crowdcast.io/e/qgss-day7 Password : qiskitday7
Avatar
Anonymous 28-Jul-20 09:53 PM
Just a quick question for anyone out there mostly for validation. Is it right to assume that the charge qubit just stores on one side of the capacitor
and how much charge there is comparable to the state which is created by microwave photons? (edited)
and you can read this out with another capacitor?
Avatar
Anonymous 28-Jul-20 10:33 PM
Anyone still facing this error?
👍 2
Avatar
Anonymous 28-Jul-20 10:35 PM
anyone got the lecture nots for day 7 yet?
Avatar
Anonymous 28-Jul-20 10:37 PM
Anyone still facing this error?
@Anonymous Yes. A lot of us are facing this error for ex1b.
Avatar
Anonymous 28-Jul-20 10:40 PM
Avatar
Anonymous 28-Jul-20 10:42 PM
@Anonymous I don't see day 7 for lecture notes. Did I miss something?
@Anonymous just got it! Thanks
Avatar
Anonymous 28-Jul-20 11:50 PM
facing this error while installing grading_tools/requirements.txt
Avatar
Anonymous 28-Jul-20 11:55 PM
@Anonymous I also meet the same error
Avatar
Anonymous 29-Jul-20 12:14 AM
Anyone still facing this error?
@Anonymous same for me
Avatar
Anonymous 29-Jul-20 12:14 AM
Is there any possibility to submit lab_7-Ex_1-b ?? I'm unable to submit it even after trying out all the possible alternate solutions !!
Avatar
Anonymous 29-Jul-20 12:15 AM
@Anonymous you don’t need to submit anything for lab 7
Avatar
Anonymous 29-Jul-20 12:16 AM
sorry
lab-6
typo !!
Avatar
Anonymous 29-Jul-20 12:16 AM
In lab 7, I do not have the kernel for submitting, so I think that we do not need to submit lab7?
Avatar
Anonymous 29-Jul-20 12:16 AM
Many people have had HTTP errors for lab 6 submission, and the mentors are working on it
Avatar
Anonymous 29-Jul-20 12:17 AM
yeah, looks like many people are getting the 422 Client Error
Avatar
Anonymous 29-Jul-20 12:17 AM
ok @Anonymous
Avatar
Anonymous 29-Jul-20 12:17 AM
I would just leave it be and complete the upcoming lab
👆 1
If you finish 6/9 labs you should be good 2 go
Avatar
Anonymous 29-Jul-20 12:18 AM
Thank you for replying fast !! @Anonymous @Anonymous @Anonymous
👍 1
Avatar
Anonymous 29-Jul-20 12:22 AM
I'm getting this error when I'm trying to build the wheel for qiskit-aer, I installed VS2019, no luck, any idea? (win10, Anaconda) (edited)
Avatar
Anonymous 29-Jul-20 12:25 AM
I'm getting this error when I'm trying to build the wheel for qiskit-aer, I installed VS2019, no luck, any idea? (win10, Anaconda)
@Anonymous try creating a new virtual environment and re-installing all the necessary packages and run in that, if it works, delete the current virtual environment
😱 1
Is there any possibility to submit lab_7-Ex_1-b ?? I'm unable to submit it even after trying out all the possible alternate solutions !!
@Anonymous keep on trying to submit multiple times, my submission got accepted after almost 20 tries 😂
👍 1
Avatar
Anonymous 29-Jul-20 12:28 AM
@Anonymous try creating a new virtual environment and re-installing all the necessary packages and run in that, if it works, delete the current virtual environment
@Anonymous Thanks Adam! Those are the words that you are not expecting to read/hear but someone has to tell you!😫
Avatar
Anonymous 29-Jul-20 12:29 AM
@Anonymous Thanks Adam! Those are the words that you are not expecting to read/hear but someone has to tell you!😫
@Anonymous see if it's a build wheel problem then this is the only solution that works, it has happened with me when I was installing tensorflow on my pc, so just suggesting 😅😅 Rest your choice
You can also try conda update and update the necessary packages first and see whether that works
Avatar
Anonymous 29-Jul-20 12:31 AM
@Anonymous see if it's a build wheel problem then this is the only solution that works, it has happened with me when I was installing tensorflow on my pc, so just suggesting 😅😅 Rest your choice
@Anonymous Will try! Environment approach is faster! Really appreciate it!
Avatar
Anonymous 29-Jul-20 12:31 AM
Does anyone still getting the lab 6 - 1b error? I tried commenting the #'https://eu-gb.functions.cloud.ibm.com/api/v1/web/salvador.de.la.puente.gonzalez%40ibm.com_dev/default/qgss_grading', and the grading goes on forever. I also tried forcing the server: This one gives me the 400 error #grade(answer1b, name, email, 'lab6', 'ex1b', server = 'https://us-south.functions.appdomain.cloud/api/v1/web/1d8ef74d-78f2-4214-a876-b8e011a0c87e/default/qgss_grading') This one keeps grading forever #grade(answer1b, name, email, 'lab6', 'ex1b', server = 'https://salvadelapuente.com:8088') Any solutions?
Avatar
Anonymous 29-Jul-20 12:32 AM
Does anyone still getting the lab 6 - 1b error? I tried commenting the #'https://eu-gb.functions.cloud.ibm.com/api/v1/web/salvador.de.la.puente.gonzalez%40ibm.com_dev/default/qgss_grading', and the grading goes on forever.
>
I also tried forcing the server: This one gives me the 400 error #grade(answer1b, name, email, 'lab6', 'ex1b', server = 'https://us-south.functions.appdomain.cloud/api/v1/web/1d8ef74d-78f2-4214-a876-b8e011a0c87e/default/qgss_grading')
>
This one keeps grading forever #grade(answer1b, name, email, 'lab6', 'ex1b', server = 'https://salvadelapuente.com:8088')
>
Any solutions?
@Anonymous Rosetti - YggBrasil what I did was commenting out the second server, then running it multiple times, after almost 20 trials, I got submission success
But someone warned not to comment out the Second server, so please do it at your own risk😅
Avatar
Anonymous 29-Jul-20 12:33 AM
@Anonymous Rosetti - YggBrasil what I did was commenting out the second server, then running it multiple times, after almost 20 trials, I got submission success
@Anonymous Just Shift + Enter multiple times?
Avatar
Anonymous 29-Jul-20 12:34 AM
@Anonymous Just Shift + Enter multiple times?
@Anonymous Rosetti - YggBrasil yes, till you get success
🙂 1
👍 1
Avatar
Anonymous 29-Jul-20 12:34 AM
OK, thank you!
Avatar
Anonymous 29-Jul-20 12:35 AM
Hey, where is there no grading cell in Lab7?
Avatar
Anonymous 29-Jul-20 12:35 AM
One trick, if you get the line "failed with current session, retrying...", immediately stop running the current cell and re-run again
🙂 1
👍 1
May save you some time @Anonymous Rosetti - YggBrasil
Avatar
Anonymous 29-Jul-20 12:35 AM
Hey, where is there no grading cell in Lab7?
@Anonymous Nope
One trick, if you get the line "failed with current session, retrying...", immediately stop running the current cell and re-run again
@Anonymous Thanks!
Avatar
Anonymous 29-Jul-20 12:36 AM
Hey, where is there no grading cell in Lab7?
@Anonymous solution is posted along with question, why are u expecting a grading cell lol (edited)
Avatar
Anonymous 29-Jul-20 12:36 AM
@Anonymous solution is posted along with question, why are u expecting a grading cell lol
@Anonymous oh sorry i overlooked the solution, my bad
Avatar
Anonymous 29-Jul-20 12:42 AM
Avatar
Anonymous 29-Jul-20 12:45 AM
@Anonymous is the grading cell present in notebook?
Avatar
Anonymous 29-Jul-20 12:46 AM
Nope, but in the lab video , i can see
Avatar
Anonymous 29-Jul-20 12:47 AM
There is no grading cell at lab 7, and there is the following quote in the instructions: This lab is a special one in that it's a free-for-all! Everyone will get the points for this lab. We encourage you to still solve it -- we have also included the solutions in the zip file.
Avatar
Anonymous 29-Jul-20 12:47 AM
Okay
And could everyone submit their Lab 6(b)?
Avatar
Anonymous 29-Jul-20 12:48 AM
And could everyone submit their Lab 6(b)?
@Anonymous I am still trying
Avatar
Anonymous 29-Jul-20 12:51 AM
Same. Still stuck with lab 6(b). But will work on lab7 and will get back to 6 later
Avatar
Anonymous 29-Jul-20 12:52 AM
@Anonymous I am still trying
@Anonymous Rosetti - YggBrasil I think there is some difference in how the program submits 6a and 6b, that's probably where there might be a bug, because 6a does well most of the time.
Avatar
Anonymous 29-Jul-20 12:55 AM
@Anonymous but if i try to submit lab7(although not necessary as per instruction), i get the same error as lab6b
Avatar
Anonymous 29-Jul-20 12:56 AM
@Anonymous Rosetti - YggBrasil I think there is some difference in how the program submits 6a and 6b, that's probably where there might be a bug, because 6a does well most of the time.
@Anonymous It should not be different, the grade.py code is generic. That is really strange!
@Anonymous but if i try to submit lab7(although not necessary as per instruction), i get the same error as lab6b
@Anonymous I sent mine without problems, but not for grading.
Avatar
Anonymous 29-Jul-20 01:11 AM
Why does it look like the x_pulse was played after sb_12_spec_pulse, even though I played it the other way round? Or is the one on the right x_pulse?
lab7
Avatar
Anonymous 29-Jul-20 01:12 AM
Hello! I couldn't able to attend 3 consecutive sessions as if I had been preoccupied with academic project work of my students being an assistant professor losing track of time, may I know if it would effect?
Avatar
Anonymous 29-Jul-20 01:13 AM
You can always go back and watch the replay, and after the summer school, the resources will be publicly available.
If one were to do dispersive shift (correlated hamiltonian of qubit and readout oscillator) measurement, would one see three curves in the spectrum, |0>, |1> and |2> states of the qubit?
Avatar
Anonymous 29-Jul-20 01:19 AM
Indeed! I knew about that, nevertheless, thank you @Anonymous and it would be appreciable if I could get response even from mentors!!
Like there might be some attendance criteria right!?
Avatar
Anonymous 29-Jul-20 01:42 AM
@Anonymous there is no attendance criteria...
Avatar
Anonymous 29-Jul-20 01:44 AM
For Lab6b, I ran the code 4 times. But there wa the same output evertime. Does anyone have the solution for this? Grading... None ...Retrying with a fresh session... lab6/ex1b - ❌ Failed: None Submitting the answers for lab6... --------------------------------------------------------------------------- HTTPError Traceback (most recent call last) <ipython-input-23-1e50d85eac41> in <module> 4 from grading_tools import grade 5 # grade(answer1a, name, email, 'lab6', 'ex1a') ----> 6 grade(answer1b, name, email, 'lab6', 'ex1b') ~/Downloads/Quantum/Qiskit Summer School 2020/Day6/lab6/grading_tools/grade.py in grade(answer, name, email, labid, exerciseid, server, answerfile, force_commit) 206 207 if force_commit: --> 208 commit_answer(labid, email, session, server) 209 210 ~/Downloads/Quantum/Qiskit Summer School 2020/Day6/lab6/grading_tools/grade.py in commit_answer(labid, email, session, server) 137 data = {'participant_email': email, 138 'session': session} --> 139 answer = send_request(data, server + '/commit-answers') 140 if answer.get('is_committed'): 141 print('📝 Our records, so far, are:') ~/Downloads/Quantum/Qiskit Summer School 2020/Day6/lab6/grading_tools/grade.py in send_request(data, endpoint, header) 124 if "Cannot decipher" in response.text: 125 print('Cannot decipher session!') --> 126 response.raise_for_status() 127 return response.json() 128 ~/.local/lib/python3.8/site-packages/requests/models.py in raise_for_status(self) 939 940 if http_error_msg: --> 941 raise HTTPError(http_error_msg, response=self) 942 943 def close(self): HTTPError: 422 Client Error: Unprocessable Entity for url: https://eu-gb.functions.cloud.ibm.com/api/v1/web/salvador.de.la.puente.gonzalez%40ibm.com_dev/default/qgss_grading/commit-answers
Avatar
Anonymous 29-Jul-20 01:56 AM
@Anonymous Many of us are facing an error in submitting assignment 6(b). Please shed some light on this matter. But, the Submission of 6(a) is perfectly fine
Avatar
Anonymous 29-Jul-20 01:57 AM
@Anonymous I know and we are trying to fix that
Give us sometime. It's a server issue (edited)
Avatar
Anonymous 29-Jul-20 01:58 AM
Okay. Sure. Many thanks. Please let us know when the concerned bug is fixed.
👍 1
Avatar
Anonymous 29-Jul-20 02:07 AM
grading forever and ever and ever......
Avatar
Anonymous 29-Jul-20 02:20 AM
grading forever and ever and ever......
@Anonymous Is there any grading for lab7??
I thought it was marked correct for all
Avatar
Anonymous 29-Jul-20 02:20 AM
There's no grading for lab 7 lol
Everyone gets points, no need to submit anything
Avatar
Anonymous 29-Jul-20 02:21 AM
Please don't get obsessed with grading lol
👍 2
Avatar
Anonymous 29-Jul-20 02:21 AM
The answer was given too XD
😆 1
Avatar
Anonymous 29-Jul-20 02:24 AM
How do we convert a circuit to a gate, label it and return it in Qiskit?
Avatar
Anonymous 29-Jul-20 02:32 AM
@Anonymous For the Day 6 and 7 lab Pulse experiments ,in order to understand any more references apart from Qiskit textbook.
Avatar
Anonymous 29-Jul-20 02:34 AM
@Anonymous For the Day 6 and 7 lab Pulse experiments ,in order to understand any more references apart from Qiskit textbook.
@Anonymous Yes please suggest some easy resources for someone who has only "pre-requisite knowledge in linear algebra and python" lol
Avatar
Anonymous 29-Jul-20 02:35 AM
Check the papers given in lecture slide.
Avatar
Anonymous 29-Jul-20 02:37 AM
Check the papers given in lecture slide.
@Anonymous Thanks . Actually , i was thinking for the Qiskit Pulse lab notebooks which consists of lot of technical programming concepts. (edited)
Avatar
Anonymous 29-Jul-20 02:43 AM
💯 2
Avatar
Anonymous 29-Jul-20 02:45 AM
@Anonymous Thanks. I'll read through it.
Avatar
Anonymous 29-Jul-20 02:58 AM
I am still getting error in Lab 6 1b
🇲 1
🇪 1
2️⃣ 1
Avatar
Anonymous 29-Jul-20 02:59 AM
having problem in lab6:ex1b
Avatar
Anonymous 29-Jul-20 03:03 AM
How do we convert a circuit to a gate, label it and return it in Qiskit?
@Anonymous helpful? anyway which lab are u referring to? (edited)
Avatar
Anonymous 29-Jul-20 03:03 AM
@Anonymous there is no attendance criteria...
@Anonymous S Okay! Thank you dear!
👍🏻 1
Avatar
Anonymous 29-Jul-20 03:08 AM
How do we convert a circuit to a gate, label it and return it in Qiskit?
@Anonymous In qiskit module of quantum circuit , we have -----"to_gate() " ----Create a Gate out of the circuit
Avatar
Anonymous 29-Jul-20 03:22 AM
Can someone help me with the this_schedule += measure << this_schedule.duration. I didn't quite understand what is happening there
Avatar
Anonymous 29-Jul-20 03:31 AM
Can someone help me with the this_schedule += measure << this_schedule.duration. I didn't quite understand what is happening there
@Anonymous I just remember one point that we want the each pulse duration to start from 0 i.e using left shift operator . (edited)
Avatar
Anonymous 29-Jul-20 03:33 AM
@Anonymous This is a case of operator overloading. The classes for the schedule and pulses have overridden the += and << operators (and others) so that you can perform common operations with them using concise syntax. The << operator delays a pulse by an integer number of frames. In this case, we are creating a delayed version of the previously defined measure pulse by the current schedule duration to place it at the end of the current schedule. The += operator adds this delayed measurement pulse to the schedule. TL:DR; this is syntactic sugar for adding a measurement pulse at the end of the schedule (edited)
Avatar
Anonymous 29-Jul-20 03:43 AM
How do we convert a circuit to a gate, label it and return it in Qiskit?
@Anonymous
Avatar
Anonymous 29-Jul-20 03:52 AM
Thanks a lot guys @Anonymous @Anonymous
👍 2
Avatar
Anonymous 29-Jul-20 04:07 AM
@Anonymous This is a case of operator overloading. The classes for the schedule and pulses have overridden the += and << operators (and others) so that you can perform common operations with them using concise syntax. The << operator delays a pulse by an integer number of frames. In this case, we are creating a delayed version of the previously defined measure pulse by the current schedule duration to place it at the end of the current schedule. The += operator adds this delayed measurement pulse to the schedule. TL:DR; this is syntactic sugar for adding a measurement pulse at the end of the schedule
@Anonymous Can i say "each pulse duration to start from 0 so we use left shift operator"
Avatar
Anonymous 29-Jul-20 04:12 AM
it's the pulse delay (aka when the pulse starts), not the pulse duration
Interestingly, shifting an instruction actually creates a schedule with that instruction and delay, so the += operator is actually adding a schedule to another schedule (by overlapping them, which is why the delay is important) (edited)
👍 2
the basic pattern from above is your_schedule += your_pulse << when_to_start_the_pulse
Avatar
Anonymous 29-Jul-20 04:18 AM
what's wrong here
Avatar
Anonymous 29-Jul-20 04:19 AM
hey, lab 7 isn't meant to be submitted
Avatar
Anonymous 29-Jul-20 04:19 AM
is the problem for lab 6 1b still solved?
I am still not able to submit
Avatar
Anonymous 29-Jul-20 04:19 AM
is the problem for lab 6 1b still solved?
@Anonymous nope, see #lab-6
mentors will keep you updated :)
Avatar
Anonymous 29-Jul-20 04:20 AM
Ok thank you for the update
😁 1
Avatar
Anonymous 29-Jul-20 04:53 AM
i am running this cell more than 4 hours no update ?is it normal or what is wrong ?
Avatar
Anonymous 29-Jul-20 04:54 AM
i am running this cell more than 4 hours no update ?is it normal or what is wrong ?
@Anonymous comment out the clear_output() line and see if there is some error
Avatar
Anonymous 29-Jul-20 04:55 AM
ok i will do it
still same problem
Avatar
Anonymous 29-Jul-20 05:07 AM
finally......
🥳 1
Avatar
Anonymous 29-Jul-20 05:25 AM
i am running this cell more than 4 hours no update ?is it normal or what is wrong ?
@Anonymous I suppose that, branching from qiskit master on github, it takes a long time because there's a lot of request
It's taking a very long time for me too
Avatar
Anonymous 29-Jul-20 05:30 AM
@Anonymous bronn Hi Nick, It seems that the fit of the width is a bit off, at least for my eyes. Is there some way to mitigate that?
Avatar
Anonymous 29-Jul-20 05:33 AM
finally......
@Anonymous Hey, I don't have a grading cell on Jupyter Notebook?
This is how it shows. There's no place to enter your name and email ID too
So, how is it supposed to be graded?
Avatar
Anonymous 29-Jul-20 05:35 AM
@Anonymous i think lab 7 marks will be given to all, no need of submitting...
Avatar
Anonymous 29-Jul-20 05:35 AM
Oh. So did you write the extra code for submission in the notebook, then?
Avatar
Anonymous 29-Jul-20 05:35 AM
yes, i added an extra cell to write
Avatar
Anonymous 29-Jul-20 05:35 AM
Alright 😅
You are sure, it's not necessary?
Avatar
Anonymous 29-Jul-20 05:36 AM
Yes it's not necessary
Avatar
Anonymous 29-Jul-20 05:36 AM
Thanks!
Avatar
Anonymous 29-Jul-20 05:36 AM
in instruction, its mentioned i guess
Avatar
Anonymous 29-Jul-20 05:36 AM
It is, yes. Well, it grades for you, so I was just confirming.
Avatar
Anonymous 29-Jul-20 05:41 AM
Can someone please explain what is this sat_cnf thing?? Not related to labs though
Avatar
Anonymous 29-Jul-20 05:42 AM
@Anonymous I tried that too, but I got the message that my pusle schedule is incorrect, although I believe it is correct.
Avatar
Anonymous 29-Jul-20 06:01 AM
@Anonymous
What's written on your screen is the following Boolean formula:
The formula has 3 Boolean variables (this is why you have "3" after "p cnf")
and 5 clauses (we'll see what's a clause in a minute, this is why you have "5" after "p cnf 3", and also five lines afterwards, each line is a clause)
Suppose that the variables are x, y, z
Then it reads: (not x or not y or not z) and (x or not y or z) and (x or y or not z) and (x or not y or not z) and (not x or y or z)
the minus sign is "not", the numbers denote the variable index, and 0 marks the end a clause
The goal is to find an assignment of true/false to each of the variables, such that all the clauses are satisfied
This problem is called "SAT" (from satisfaction), and CNF is the structure of a set of clauses (AND between clauses, OR within clauses)
Grover algorithm can solve SAT instances faster than classical computers
Avatar
Anonymous 29-Jul-20 06:43 AM
@Anonymous Preis plz keep trying, i got same errors but finally succeeded
Avatar
Anonymous 29-Jul-20 06:50 AM
unable to see lecture 1 notes did you guys removed it ?
Avatar
Anonymous 29-Jul-20 06:58 AM
Avatar
Anonymous 29-Jul-20 06:59 AM
@Anonymous not working
Avatar
Anonymous 29-Jul-20 06:59 AM
Will the final project links be given tomorrow?
Anyone ?
Avatar
Anonymous 29-Jul-20 07:02 AM
Hi everyone! Hope you are enjoying this summer school. Does anyone know whether we will be able to access labs after the summer school is over? will they be deleted or will be accessible even after the 31st of July?
Avatar
Anonymous 29-Jul-20 07:05 AM
This problem is called "SAT" (from satisfaction), and CNF is the structure of a set of clauses (AND between clauses, OR within clauses) @Anonymous thanks a lot
Avatar
Anonymous 29-Jul-20 07:07 AM
Does it matter that it gives me an ERROR here after executing "!pip install -U -r grading_tools/requirements_nowin.txt"
Avatar
Anonymous 29-Jul-20 07:13 AM
@Anonymous yes, check #announcements. 😊
Avatar
Anonymous 29-Jul-20 07:17 AM
can someone help please? I am getting this error any solutions??
Avatar
Anonymous 29-Jul-20 07:18 AM
Avatar
Anonymous 29-Jul-20 07:24 AM
@Anonymous this is a very common issue, see #lab-6
Avatar
Anonymous 29-Jul-20 07:25 AM
ohh thanks a lot
👍 2
Avatar
Anonymous 29-Jul-20 07:32 AM
Will the final project links be given tomorrow?
@Anonymous Yes! Check #announcements
Avatar
Anonymous 29-Jul-20 07:35 AM
Will the final project links be given tomorrow?
@Anonymous tomorrow is relative here 😋 😋 😋 😋
Avatar
Anonymous 29-Jul-20 07:56 AM
Is this the fix for the "BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending." Error? cause it's not working for me.
Avatar
Anonymous 29-Jul-20 08:49 AM
what's wrong here
@Anonymous Hey! I am getting the same thing. How did you fix it?
Avatar
Anonymous 29-Jul-20 09:09 AM
@Anonymous Did you restart your kernel before running that?
Avatar
Anonymous 29-Jul-20 09:15 AM
Is this the fix for the "BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending." Error? cause it's not working for me.
@Anonymous It wasn't working for me either since. The pip install was triggering an error about a version of qiskit-aer. I solve the problem by creating a completely new environnement with conda, installed matplotlib and jupyterlab and ran the pip install with the "nowin" file.
Avatar
Anonymous 29-Jul-20 09:30 AM
@Anonymous It wasn't working for me either since. The pip install was triggering an error about a version of qiskit-aer. I solve the problem by creating a completely new environnement with conda, installed matplotlib and jupyterlab and ran the pip install with the "nowin" file.
@Anonymous +1
Avatar
Anonymous 29-Jul-20 09:34 AM
Hi, the lab 6, now is working!!! thank you IBM!!!
qiskitsmart 2
Avatar
Anonymous 29-Jul-20 09:37 AM
Hi, the lab 6, now is working!!! thank you IBM!!!
@Anonymous With or without commenting the server in grade.py?
Avatar
Anonymous 29-Jul-20 09:38 AM
@Anonymous wiithout commenting
Avatar
Anonymous 29-Jul-20 09:39 AM
Great! :)
Avatar
Anonymous 29-Jul-20 09:39 AM
It worked for me too!
"no comments" 😆
Avatar
Anonymous 29-Jul-20 10:02 AM
It worked for me as well.. :D
Thanks to Team IBMQ for fixing that error.
Avatar
Anonymous 29-Jul-20 10:03 AM
Worked for me as well. Thank you IBM team for fixing this error.
Avatar
Anonymous 29-Jul-20 10:04 AM
confirming this has been fixed - it worked just the very first time. Solid work from IBM team
Avatar
Anonymous 29-Jul-20 10:04 AM
I have a friend who does not have access to discord (later registration) but would like to participate in the post-course challenge. Is it possible for him to join a team for the challenge? Thank you!
Avatar
Anonymous 29-Jul-20 10:09 AM
I have a friend who does not have access to discord (later registration) but would like to participate in the post-course challenge. Is it possible for him to join a team for the challenge? Thank you!
@Anonymous better ask this question in #support-general
Avatar
Anonymous 29-Jul-20 10:11 AM
Thank you @Anonymous
Avatar
Anonymous 29-Jul-20 10:12 AM
Just confirming: It isn't necessary to submit Lab7, right?
Avatar
Anonymous 29-Jul-20 10:18 AM
Just confirming: It isn't necessary to submit Lab7, right?
@Anonymous youre right 🙂
Avatar
Anonymous 29-Jul-20 11:40 AM
I have just finished my first 4 labs. And I feel very lost in the second week. Is it possible to do the remained ones by following the instructions in the jupyter notebooks?
Avatar
Anonymous 29-Jul-20 11:45 AM
basically yes
Avatar
Anonymous 29-Jul-20 12:02 PM
@Anonymous How the whey of mapping fermion on qbits influence reconstruction of fermionic algebra?
Avatar
Anonymous 29-Jul-20 01:25 PM
@Anonymous depends on the map you choose you could end up with fermionic or bosonic algebra, so you have to choose the right map in order to have the fermionic algebra (anticommutator =1)
Avatar
Anonymous 29-Jul-20 01:31 PM
Thanks @Anonymous
Avatar
Anonymous BOT 29-Jul-20 02:11 PM
Lecture and Lecture Note Links: Week 2 All lecture notes are available in #resources - check the pinned files! Day 6: Superconducting Qubits I: Quantizing a Harmonic Oscillator, Josephson Junctions Lecturer : Zlatko Minev Recording : https://www.crowdcast.io/e/qgss-day6 Password : qiskitday6 Day 7: Superconducting Qubits II: Readout and Circuit QED, Calibrating a Qubit Frequency and Readout Lecturer : Zlatko Minev Recording : https://www.crowdcast.io/e/qgss-day7 Password : qiskitday7 Day 8: Quantum Chemistry I: Going from Problem Description to Qubit Hamiltonian for H2 and LiH Lecturer : Antonio Mezzacapo Recording : https://www.crowdcast.io/e/qgss-day8 Password : qiskitday8
Avatar
Anonymous 29-Jul-20 02:52 PM
Is there any lab for today?? Or it will be final project all together??
Avatar
Anonymous 29-Jul-20 02:54 PM
I understand the lab is separate from the final project which is optional @Anonymous
Avatar
Anonymous 29-Jul-20 02:55 PM
Okay, Thank you @Anonymous
Avatar
Anonymous 29-Jul-20 02:59 PM
Is there any lab for today?? Or it will be final project all together??
@Anonymous Lab will be released later today 😊
❤️ 2
Avatar
Anonymous 29-Jul-20 03:01 PM
thank you @Anonymous
Avatar
Anonymous 29-Jul-20 03:44 PM
Just wondering if there are any good papers on the transmon qubits that IBM build. Concentrating on how they build it. Maybe focussing on the deposition techniques. It might be worth trying to build a simple one and see if I can make a few operations for comparison. (The resonator I have figured out so it would just be the qubit)
And some good papers to introduce us to flux and phase qubit at our level would be helpful too for referance
Avatar
Anonymous BOT 29-Jul-20 03:52 PM
Lecture and Lecture Note Links: Week 2 All lecture notes are available in #resources - check the pinned files! Day 6: Superconducting Qubits I: Quantizing a Harmonic Oscillator, Josephson Junctions Lecturer : Zlatko Minev Recording : https://www.crowdcast.io/e/qgss-day6 Password : qiskitday6 Day 7: Superconducting Qubits II: Readout and Circuit QED, Calibrating a Qubit Frequency and Readout Lecturer : Zlatko Minev Recording : https://www.crowdcast.io/e/qgss-day7 Password : qiskitday7 Day 8: Quantum Chemistry I: Going from Problem Description to Qubit Hamiltonian for H2 and LiH Lecturer : Antonio Mezzacapo Recording : https://www.crowdcast.io/e/qgss-day8 Password : qiskitday8
Avatar
Anonymous 29-Jul-20 04:24 PM
when will the lab be posted?
Avatar
Anonymous 29-Jul-20 04:26 PM
when will the lab be posted?
@Anonymous Soon, just be patient 🙂
Avatar
Anonymous 29-Jul-20 04:35 PM
The lab will be posted with its solution in spoiler😂 😂 😂
I'm going to sleep. Bye guys
😆 2
Avatar
Anonymous 29-Jul-20 04:38 PM
Byeee 🙂
Avatar
Anonymous 29-Jul-20 04:49 PM
Byee
Avatar
Anonymous 29-Jul-20 04:51 PM
I can't find lecture 8 notes
👍 1
Avatar
Anonymous 29-Jul-20 04:51 PM
Just wondering if anyone knows how multipleximg is done on qubits. Is it right to assume that the qubit resonant frequencies are all inherently different (on ibm chips)?
Or are tunable? (edited)
So that they can be driven by different encoded frequency pulses which are then added together to make one pulse. To drive them all at the same time? @Anonymous (edited)
Avatar
Anonymous 29-Jul-20 05:03 PM
I can't find lecture 8 notes
@Anonymous Atallah I believe they are not posted yet, but @Anonymous PN posts under #memorable-lecture-notes the highlights of the lectures in real time, not sure if this helps :).
👍 2
Avatar
Anonymous 29-Jul-20 05:08 PM
Quick q - I re-installed conda, and command line does not recognize "conda" command. I am able to use Jupyter Lab in Anaconda and able to submit, but not Jupyter Notebook. From a grading perspective, I don't think this would be an issue, correct? But from an installation perspective, macos has issues with Anaconda. I followed all fix suggestions online, but still having trouble. If someone has any insights, that would be great. @Anonymous (edited)
Avatar
Anonymous 29-Jul-20 05:11 PM
Do we not have any lab today?
Avatar
Anonymous 29-Jul-20 05:12 PM
Do we not have any lab today?
@Anonymous Not posted yet, just be patient 😊
👍 1
Avatar
Anonymous 29-Jul-20 05:19 PM
@Anonymous if you are still able to run the notebook in jupyter lab then the grading should work fine. As for jupyter notebook, did you initialise your path variable?
Avatar
Anonymous 29-Jul-20 05:21 PM
thank you@Anonymous into the .zshrc file, I pasted export PATH="/Users/myusername/anaconda3/bin:$PATH"
(and changed myusername to my username 🙂 )
Avatar
Anonymous 29-Jul-20 06:15 PM
and that did not work, was what I meant
Avatar
Anonymous 29-Jul-20 06:28 PM
what should i do in here
Avatar
Anonymous 29-Jul-20 06:30 PM
what should i do in here
@Anonymous Hey! It seems that you need to store your IBM account credentials onto your environment. You can use IBMQ.save_account('credentials') before IBMQ.load_account() The credentials are available in your IBM Quantum Experience account profile (edited)
Avatar
Anonymous 29-Jul-20 06:32 PM
ohk thank u
SuperimposedSmileWhite 2
Avatar
Anonymous 29-Jul-20 06:50 PM
Is lab 8 not yet put up?
Avatar
Anonymous 29-Jul-20 06:50 PM
will there be a lab 8 ? 🙂 aren't we supposed to give in 8 and 9 until the 30th? (already 30th here)
Avatar
Anonymous 29-Jul-20 06:50 PM
May be they're working on something at the back end, so we wait patiently :)
Avatar
Anonymous 29-Jul-20 06:52 PM
Yep, Lab 8 isn't released yet 🙂
Avatar
Anonymous 29-Jul-20 06:59 PM
will there be a lab 8 ? 🙂 aren't we supposed to give in 8 and 9 until the 30th? (already 30th here)
@Anonymous I think they extended the deadline to the 2nd of August. I'll check
yes! type !faq in the sanbox channel (edited)
Avatar
Anonymous 29-Jul-20 07:04 PM
Yeah , lab deadline is 2nd August
👍 2
@Anonymous
Avatar
Anonymous 29-Jul-20 07:13 PM
Finally Lab-6 ex1b grader now works! Grading... lab6/ex1b - 🎉 Correct 🎊 Hurray! You have a new correct answer! Let's submit it. Submitting the answers for lab6... 📝 Our records, so far, are: Correct answers: lab1:ex1, lab2:ex1, lab3:ex1, lab4:ex1, lab5:ex1, lab6:ex1a, lab6:ex1b
💯 4
👍 2
Avatar
Anonymous 29-Jul-20 07:15 PM
Finally Lab-6 ex1b grader now works!
>
Grading... lab6/ex1b - 🎉 Correct 🎊 Hurray! You have a new correct answer! Let's submit it. Submitting the answers for lab6... 📝 Our records, so far, are: Correct answers: lab1:ex1, lab2:ex1, lab3:ex1, lab4:ex1, lab5:ex1, lab6:ex1a, lab6:ex1b
@Anonymous Geraldo Machado Yay! 🥳 🎉 🎊
Avatar
Anonymous 29-Jul-20 07:30 PM
For which lab did you need the IBM Q experience account?
@Anonymous Lab 5 (although I heard you can still submit if you don't)
Avatar
Anonymous 29-Jul-20 07:36 PM
Lab today?
Avatar
Anonymous 29-Jul-20 07:43 PM
I tried that but that updates my qiskit aer to version 6
Avatar
Anonymous 29-Jul-20 07:44 PM
@Anonymous I am wondering the same thing.
Avatar
Anonymous 29-Jul-20 07:44 PM
Do we have lab today?
Avatar
Anonymous 29-Jul-20 07:44 PM
@Anonymous Yes. I have the same question.
Avatar
Anonymous 29-Jul-20 07:45 PM
until the lab signment appears, I am getting a weid plot in exercise 7.
a peak is not distinguishable
Do you happen to know what is wrong?
I can't manage to find my error
😦
Avatar
Anonymous 29-Jul-20 07:50 PM
change your rabi experiment from lab 6.
💯 1
Avatar
Anonymous 29-Jul-20 07:56 PM
THANKS!
got it!
🙂
Avatar
Anonymous 29-Jul-20 08:15 PM
It is 20:15 in EDT guess no labs today. Pretty Late. 😕 Looking Forward to Tomorrow’s Lecture!
Avatar
Anonymous 29-Jul-20 08:18 PM
2:16 CET. Yeah, I guess so... 😦 Good night/afternoon.
Avatar
Anonymous 29-Jul-20 08:26 PM
so also no lecture notes 8?
😢 2
Avatar
Anonymous 29-Jul-20 08:41 PM
so also no lecture notes 8?
@Anonymous coming soon 🙂
Avatar
Anonymous 29-Jul-20 08:41 PM
What Abe means its that there no grading cell today?
He wrote something right now
Avatar
Anonymous 29-Jul-20 08:41 PM
like lab7
Avatar
Anonymous 29-Jul-20 08:41 PM
What Abe means its that there no grading cell today?
@Anonymous We all get points 🙂
We don't need to run a grading block 🙂
Avatar
Anonymous 29-Jul-20 08:42 PM
But today isnt a lab but a visual guide of the lab, that is the video on youtube right?
Cool
Avatar
Anonymous 29-Jul-20 08:42 PM
yep, there should be a .zip file
but i don't see one
it's now uploaded :)
Avatar
Anonymous 29-Jul-20 08:57 PM
Hi all, lab 8 is available
🥳 3
Avatar
Anonymous 29-Jul-20 09:01 PM
We don't need to run a grading block 🙂
@Anonymous Two consecutives labs with free points to everyone. Does it mean the last one will be the hardest one?
😢 1
Avatar
Anonymous 29-Jul-20 09:03 PM
@Anonymous Two consecutives labs with free points to everyone. Does it mean the last one will be the hardest one?
@Anonymous Ummm, I dont know 🤣
@Anonymous Two consecutives labs with free points to everyone. Does it mean the last one will be the hardest one?
@Anonymous There's also a possibility the last lab is a freebie 😉
Avatar
Anonymous 29-Jul-20 09:05 PM
@Anonymous Ummm, I dont know 🤣
@Anonymous Shall I use the same hope meme that I showed yesterday?
Avatar
Anonymous 29-Jul-20 09:05 PM
Hi all, lab 8 is available
@Anonymous it's cool on Youtube, could you combine all lab instruction videos to the Youtube lecture list?
Avatar
Anonymous 29-Jul-20 09:06 PM
@Anonymous Shall I use the same hope meme that I showed yesterday?
@Anonymous 😁 😁 😁
Avatar
Anonymous 29-Jul-20 09:07 PM
@Anonymous There's also a possibility the last lab is a freebie 😉
@Anonymous
Okey seriously
Time to do lab 7
Avatar
Anonymous 29-Jul-20 09:08 PM
@Anonymous
@Anonymous oh no I dont have gifs on my phone 😢
Avatar
Anonymous 29-Jul-20 09:08 PM
@Anonymous oh no I dont have gifs on my phone 😢
@Anonymous I'm using discord from desktop
Avatar
Anonymous 29-Jul-20 09:08 PM
@Anonymous lolol im pulling out my computer just for this
Avatar
Anonymous 29-Jul-20 09:08 PM
Avatar
Anonymous 29-Jul-20 09:09 PM
Avatar
Anonymous 29-Jul-20 09:15 PM
🤣
Avatar
Anonymous 29-Jul-20 09:30 PM
LOOOL😊
Avatar
Anonymous 29-Jul-20 09:32 PM
@Anonymous it's cool on Youtube, could you combine all lab instruction videos to the Youtube lecture list?
@Anonymous I don't think I can do that. 😀 We need to ask the admin if the lab videos can be combine in the youtube lecture link. (edited)
Avatar
Anonymous 29-Jul-20 09:35 PM
Lab 6 B!!
🥳 1
Me at the moment
Avatar
Anonymous 29-Jul-20 09:39 PM
Lab 6 B!!
@Anonymous Yayyyy!!!
Avatar
Anonymous 29-Jul-20 09:43 PM
@Anonymous the associated textbook reading suggests additional reading for today's and tomorrow's lecture. Does this direct to our own search of the related materials or would you be providing some material about these lectures, besides the notes and video recordings?
Avatar
Anonymous 29-Jul-20 09:47 PM
@Anonymous What is the pass mark for the course?
Avatar
Anonymous 29-Jul-20 09:49 PM
@Anonymous the associated textbook reading suggests additional reading for today's and tomorrow's lecture. Does this direct to our own search of the related materials or would you be providing some material about these lectures, besides the notes and video recordings?
@Anonymous For today's and tomorrow's lectures, you will be discussing quantum chemistry and how to implement VQE on a real system -- there is a chapter in the qiskit textbook dedicated to this topic. Not sure if you had something else in mind
@Anonymous What is the pass mark for the course?
@Anonymous Hi -- this is in your attendee guide
Avatar
Anonymous 29-Jul-20 09:51 PM
Lab 7 question: If I get a RuntimeError where maxfev = 1000, what does that mean? Apologies if this was already answered many times here.
Avatar
Anonymous 29-Jul-20 09:53 PM
@Anonymous Asfaw how can you know your grade?
Avatar
Anonymous 29-Jul-20 09:56 PM
@Anonymous For today's and tomorrow's lectures, you will be discussing quantum chemistry and how to implement VQE on a real system -- there is a chapter in the qiskit textbook dedicated to this topic. Not sure if you had something else in mind
@Anonymous Asfaw Related to this, a message here: https://discordapp.com/channels/729706617951485954/729710164546027629/737711242243997696 showing that we extended the labs until August 2 -- some people pointed out major holidays coming up and other related issue also prompted us to push it to Aug 2 to accommodate everyone's needs
Avatar
Anonymous 29-Jul-20 09:56 PM
@Anonymous For today's and tomorrow's lectures, you will be discussing quantum chemistry and how to implement VQE on a real system -- there is a chapter in the qiskit textbook dedicated to this topic. Not sure if you had something else in mind
@Anonymous Asfaw just curious because the attendee guide mentions "additional reading" besides the qiskit textbook
Avatar
Anonymous 29-Jul-20 09:57 PM
Lab 7 question: If I get a RuntimeError where maxfev = 1000, what does that mean? Apologies if this was already answered many times here.
@Anonymous This happens when your fitter's starting points are too far away, or your fitter otherwise fails after running 1000 iterations. You can try to set the initial points for the fit closer to the real values
Avatar
Anonymous 29-Jul-20 09:57 PM
So use bigger steps? I think I follow
Avatar
Anonymous 29-Jul-20 09:58 PM
@Anonymous Asfaw just curious because the attendee guide mentions "additional reading" besides the qiskit textbook
@Anonymous Ah I see what you mean -- if you noticed in the labs, we've been pointing to other references when necessary. That's all that meant -- relevant sections in other books or across the internet. And I'm sure you've also been doing your own searching too 🙂
Avatar
Anonymous 29-Jul-20 09:58 PM
@Anonymous Ah I see what you mean -- if you noticed in the labs, we've been pointing to other references when necessary. That's all that meant -- relevant sections in other books or across the internet. And I'm sure you've also been doing your own searching too 🙂
@Anonymous Asfaw Gotcha! Thanks!
Avatar
Anonymous 29-Jul-20 10:09 PM
@Anonymous Asfaw Now I got this, now the fun part is figuring out the meaning of the result I suppose
Avatar
Anonymous 29-Jul-20 10:25 PM
... Since transmon anharmonicity is supposed to be around -300 MHz I feel as though I hit a foul ball way behind home plate LOL
Avatar
Anonymous 29-Jul-20 10:34 PM
For lab 8, I have tried ""Z2Symmetries.taper(qubitOp_t,[1])"" but this does not work... any suggestions?
👍 1
Avatar
Anonymous 29-Jul-20 10:41 PM
Guys in the form for the final project, there is no timezone for ist?? Which is utc+5.30 (edited)
What shall we choose??
Avatar
Anonymous 29-Jul-20 10:43 PM
@Anonymous you decide at your convenience, just keep in mind which one you choose for when you stay with your team (edited)
Avatar
Anonymous 29-Jul-20 10:50 PM
--------------------------------------------------------------------------- QiskitChemistryError Traceback (most recent call last) <ipython-input-8-5174cef8df66> in <module> 7 basis = 'sto3g' 8 ----> 9 driver = PySCFDriver(molecular_coordinates, unit=distance_unit) 10 11 molecule = driver.run() ~\anaconda3\lib\site-packages\qiskit\chemistry\drivers\pyscfd\pyscfdriver.py in init(self, atom, unit, charge, spin, basis, hf_method, conv_tol, max_cycle, init_guess, max_memory) 70 QiskitChemistryError: Invalid Input 71 """ ---> 72 self._check_valid() 73 if not isinstance(atom, list) and not isinstance(atom, str): 74 raise QiskitChemistryError("Invalid atom input for PYSCF Driver '{}'".format(atom)) ~\anaconda3\lib\site-packages\qiskit\chemistry\drivers\pyscfd\pyscfdriver.py in _check_valid() 106 raise QiskitChemistryError(err_msg) from ex 107 --> 108 raise QiskitChemistryError(err_msg) 109 110 def run(self) -> QMolecule: QiskitChemistryError: 'PySCF is not installed. See https://sunqm.github.io/pyscf/install.html'
how can I fix this error?
Avatar
Anonymous 29-Jul-20 10:53 PM
--------------------------------------------------------------------------- QiskitChemistryError Traceback (most recent call last) <ipython-input-8-5174cef8df66> in <module> 7 basis = 'sto3g' 8 ----> 9 driver = PySCFDriver(molecular_coordinates, unit=distance_unit) 10 11 molecule = driver.run()
>
~\anaconda3\lib\site-packages\qiskit\chemistry\drivers\pyscfd\pyscfdriver.py in init(self, atom, unit, charge, spin, basis, hf_method, conv_tol, max_cycle, init_guess, max_memory) 70 QiskitChemistryError: Invalid Input 71 """ ---> 72 self._check_valid() 73 if not isinstance(atom, list) and not isinstance(atom, str): 74 raise QiskitChemistryError("Invalid atom input for PYSCF Driver '{}'".format(atom))
>
~\anaconda3\lib\site-packages\qiskit\chemistry\drivers\pyscfd\pyscfdriver.py in _check_valid() 106 raise QiskitChemistryError(err_msg) from ex 107 --> 108 raise QiskitChemistryError(err_msg) 109 110 def run(self) -> QMolecule:
>
QiskitChemistryError: 'PySCF is not installed. See https://sunqm.github.io/pyscf/install.html'
@Anonymous Atallah I tried "pip install pyscf" with no success
Avatar
Anonymous 29-Jul-20 10:54 PM
me too
Avatar
Anonymous 29-Jul-20 10:54 PM
Maybe because I'm using Windows, system variables like LD_LIBRARY_PATH are not defined 😦
me too
@Anonymous Atallah But if you're using anaconda i think you can do "conda install -c pyscf pyscf" (from https://sunqm.github.io/pyscf/install.html)
👍 1
I&#39;m attempting to install pyscf on Windows using pip install pyscf. However I keep getting this error: Traceback (most recent call last): File &quot;&lt;string&gt;&quot;, li...
Avatar
Anonymous 29-Jul-20 11:13 PM
(base) C:\Users\MAtaa>conda install -c pyscf pyscf Collecting package metadata (current_repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Collecting package metadata (repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. PackagesNotFoundError: The following packages are not available from current channels: - pyscf Current channels: - https://conda.anaconda.org/pyscf/win-64 - https://conda.anaconda.org/pyscf/noarch - https://repo.anaconda.com/pkgs/main/win-64 - https://repo.anaconda.com/pkgs/main/noarch - https://repo.anaconda.com/pkgs/r/win-64 - https://repo.anaconda.com/pkgs/r/noarch - https://repo.anaconda.com/pkgs/msys2/win-64 - https://repo.anaconda.com/pkgs/msys2/noarch To search for alternate channels that may provide the conda package you're looking for, navigate to https://anaconda.org and use the search bar at the top of the page.
@Anonymous Fonseca conda command doesn't work also
Avatar
Anonymous 29-Jul-20 11:14 PM
@Anonymous Fonseca conda command doesn't work also
@Anonymous help 😥
😢 1
Avatar
Anonymous 29-Jul-20 11:17 PM
@Anonymous Atallah have you tried pip installing?
Avatar
Anonymous 29-Jul-20 11:17 PM
?
Avatar
Anonymous 29-Jul-20 11:17 PM
--------------------------------------------------------------------------- QiskitChemistryError Traceback (most recent call last) <ipython-input-8-5174cef8df66> in <module> 7 basis = 'sto3g' 8 ----> 9 driver = PySCFDriver(molecular_coordinates, unit=distance_unit) 10 11 molecule = driver.run()
>
~\anaconda3\lib\site-packages\qiskit\chemistry\drivers\pyscfd\pyscfdriver.py in init(self, atom, unit, charge, spin, basis, hf_method, conv_tol, max_cycle, init_guess, max_memory) 70 QiskitChemistryError: Invalid Input 71 """ ---> 72 self._check_valid() 73 if not isinstance(atom, list) and not isinstance(atom, str): 74 raise QiskitChemistryError("Invalid atom input for PYSCF Driver '{}'".format(atom))
>
~\anaconda3\lib\site-packages\qiskit\chemistry\drivers\pyscfd\pyscfdriver.py in _check_valid() 106 raise QiskitChemistryError(err_msg) from ex 107 --> 108 raise QiskitChemistryError(err_msg) 109 110 def run(self) -> QMolecule:
>
QiskitChemistryError: 'PySCF is not installed. See https://sunqm.github.io/pyscf/install.html'
@Anonymous Atallah @Anonymous Fonseca hey, were you able to use pip install to install something else?
Avatar
Anonymous 29-Jul-20 11:18 PM
@Anonymous Atallah @Anonymous Fonseca hey, were you able to use pip install to install something else?
@Anonymous yep
Avatar
Anonymous 29-Jul-20 11:19 PM
@Anonymous Atallah have you tried pip installing?
@Anonymous yes, it gives me an error
😥 1
😭 2
It think this package is not designed for windows
Avatar
Anonymous 29-Jul-20 11:20 PM
Avatar
Anonymous 29-Jul-20 11:21 PM
@Anonymous I am already using anaconda
Avatar
Anonymous 29-Jul-20 11:22 PM
ohhhhhhh i seeeeeee
it's the pyscf?
Avatar
Anonymous 29-Jul-20 11:22 PM
It think this package is not designed for windows
@Anonymous Atallah it seems so https://github.com/pyscf/pyscf/issues/300
I&#39;m attempting to install pyscf on Windows using pip install pyscf. However I keep getting this error: Traceback (most recent call last): File &quot;&lt;string&gt;&quot;, li...
😢 2
Avatar
Anonymous 29-Jul-20 11:22 PM
I have used anaconda prompt to install the package but it gives me an error
Avatar
Anonymous 29-Jul-20 11:24 PM
Hi folks, if you're on Windows, you should have better luck using the Windows Subsystem for Linux, re-installing Anaconda on that, and then installing PySCF there.
Note: Ubuntu 18.04 on WSL does not work with PySCF either. I'm trying it out with Ubuntu 20.04 now
Avatar
Anonymous 29-Jul-20 11:25 PM
Also, I was able to run this on google colab 🙂
👍 3
Once you open it on google colab, add
!pip install qiskit
Avatar
Anonymous 29-Jul-20 11:26 PM
Note: Ubuntu 18.04 on WSL does not work with PySCF either. I'm trying it out with Ubuntu 20.04 now
@Anonymous Thanks for the heads up, so I don't waste my time.
@Anonymous it's interesting to me you chose Google Colab instead of IBM QE
Avatar
Anonymous 29-Jul-20 11:27 PM
Oh, I could probably use that as well
I just use Google Colab since I use that a lot more generally 🙂
For school work 🙂
But yeah, it's possible on IBMQ as well 🙂
Did we have to import the resources folder?
The problem with running the rest of the labs in IBMQ was the fact that importing files wasn't trivial
Avatar
Anonymous 29-Jul-20 11:30 PM
The resources folder just contain the images, I think
Avatar
Anonymous 29-Jul-20 11:30 PM
Oh cool! That means you can run on IBMQ as well 🙂
Avatar
Anonymous 29-Jul-20 11:35 PM
It works on Google colab 🙂👏
👍 1
Avatar
Anonymous 29-Jul-20 11:38 PM
Note: Ubuntu 18.04 on WSL does not work with PySCF either. I'm trying it out with Ubuntu 20.04 now
@Anonymous That's bad...
Avatar
Anonymous 29-Jul-20 11:40 PM
@Anonymous That's bad...
@Anonymous @Anonymous 's solution is way better. Use google colab
Avatar
Anonymous 29-Jul-20 11:40 PM
Or IBMQ 🙂
Avatar
Anonymous 29-Jul-20 11:52 PM
I wonder why PySCFDriver does not take basis variable? What if I want to do this in a different basis?
👆 2
Avatar
Anonymous 29-Jul-20 11:56 PM
Note: Ubuntu 18.04 on WSL does not work with PySCF either. I'm trying it out with Ubuntu 20.04 now
@Anonymous If there are any folks still foolish enough to try and run PySCF locally on a Windows machine, it works on Ubuntu 20.04 in WSL, with Anaconda/Python 3.8. You would still need to install some build tools (gcc, python3-dev) before installing installing qiskit, though
👍 1
Avatar
Anonymous 30-Jul-20 12:08 AM
@Anonymous It worked me on Ubuntu 18.04
Avatar
Anonymous 30-Jul-20 12:08 AM
You didn't get a glibc-2.2.9 error?
Avatar
Anonymous 30-Jul-20 12:08 AM
Nope, everything run
ran**
Avatar
Anonymous 30-Jul-20 12:08 AM
Hmm
Avatar
Anonymous 30-Jul-20 12:09 AM
If the pulse fitting is done, the exercise is fine, isn't it?
done correctly, I mean
Avatar
Anonymous 30-Jul-20 12:10 AM
Is anyone else unable to install the requirements for lab 7? It's just hanging for me
Avatar
Anonymous 30-Jul-20 12:11 AM
Is anyone else unable to install the requirements for lab 7? It's just hanging for me
@Anonymous Ramachandran You're installing files directly from Qiskit's Github master branch, it may take some time because it's receiving many requests, and it may be a lot of files
👍 1
If the pulse fitting is done, the exercise is fine, isn't it?
@Anonymous Yep 😄
Avatar
Anonymous 30-Jul-20 12:12 AM
>
You didn't get a glibc-2.2.9 error? @Anonymous Do you update && upgrade ubuntu everyday?
@Anonymous Yep 😄
@Anonymous 😶
Avatar
Anonymous 30-Jul-20 12:13 AM
@Anonymous 😶
@Anonymous what? 😂
Avatar
Anonymous 30-Jul-20 12:17 AM
@Anonymous what? 😂
@Anonymous Nevermind. I'm overthinking all the stuff :v
Avatar
Anonymous 30-Jul-20 12:17 AM
🙂 (edited)
Avatar
Anonymous 30-Jul-20 12:39 AM
For lab 8, I have tried ""Z2Symmetries.taper(qubitOp_t,[1])"" but this does not work... any suggestions?
@Anonymous you have to call the method from the Z2Symmetries object corresponding to the untapered operator (the one with 1 symmetry left)
Avatar
Anonymous 30-Jul-20 12:42 AM
Is there any way to install pyscf in anaconda in windows environment?
Avatar
Anonymous 30-Jul-20 12:43 AM
@Anonymous is it possible to remove only one symmetry from an operator when it has multiple symmetries using the taper() method? or in general, to remove only only a proper subset of the found symmetries?
or does that even make sense?
Avatar
Anonymous 30-Jul-20 12:46 AM
Is there any way to install pyscf in anaconda in windows environment?
@Anonymous Vibhu Many attempted and couldn't install it, I suggested using IBMQ (or Google Colab)
Avatar
Anonymous 30-Jul-20 12:48 AM
Do all we get score for lab7 and Lab8 ?
Avatar
Anonymous 30-Jul-20 12:48 AM
yes
Avatar
Anonymous 30-Jul-20 12:48 AM
How can we check our score so far ?
@Anonymous Thank you
Avatar
Anonymous 30-Jul-20 12:49 AM
it should appear when you send a new submission to a lab
don't know if there is another way to check
Avatar
Anonymous 30-Jul-20 12:50 AM
Thank you for your information @Anonymous
👍 1
Avatar
Anonymous 30-Jul-20 01:00 AM
@Anonymous Could u post instructions on how to use Google golab
^colab
Avatar
Anonymous 30-Jul-20 01:03 AM
Using Google Colab Step 0. (For those who are first time users of Google Colab), Go to colab.research.google.com Sign in using your Gmail account. And you are ready to use Google Colab 🙂 Step 1. upload ex1.ipynb to google drive Step 2. click on file ex1.ipynb Step 3. click Open With and select Google Colab. You should now see your notebook Step 4. You'll need to install qiskit, so include the following line of code:
!pip install qiskit
Step 5. And you're all set to run 🙂 (edited)
👍 2
🙏 1
i might be missing steps
have you guys tried it on IBMQ though? they already have qiskit installed 🙂
Avatar
Anonymous 30-Jul-20 01:17 AM
@Anonymous You would need grading tools and other folders uploaded as well.
Avatar
Anonymous 30-Jul-20 01:17 AM
^this is only for lab 8
there's no grading in lab 8 🙂
so you don't need to upload grading tools and other folders
👍 1
Avatar
Anonymous 30-Jul-20 01:25 AM
@Anonymous Thanks, Ppajarillo. Your solution based on Google Colaboratory worked.
🎉 1
Avatar
Anonymous 30-Jul-20 01:26 AM
@Anonymous Vibhu No problem 🙂
Avatar
Anonymous 30-Jul-20 01:27 AM
@Anonymous 🙏
Avatar
Anonymous 30-Jul-20 01:31 AM
Using IBM Quantum Experience Step 1. Log into https://quantum-computing.ibm.com Step 2. Hover over the left toolbar, and click on Qiskit Notebooks Step 3. Click Import Step 4. Choose ex1.ipynb (in lab 8 folder) Step 5. Your notebook should be all set 🙂 (edited)
Program real quantum systems with the leading quantum cloud application.
Also if anyone has Windows and was successfully able to install PySCF, please let us know :) We have tried installation with pip and installation with conda with no success 😦
Avatar
Anonymous 30-Jul-20 01:34 AM
@Anonymous it does not show any option such as Colab in my drive; should i install that separately
Avatar
Anonymous 30-Jul-20 01:35 AM
@Anonymous it does not show any option such as Colab in my drive; should i install that separately
@Anonymous Yeah I think you can sign up for one, I don't remember exactly though
Avatar
Anonymous 30-Jul-20 01:37 AM
ok it does seem to work on IBMQ though
thanks for both the steps!
will our notebooks be saved in IBMQ later too ?
can we have multiple notebooks over there?
Avatar
Anonymous 30-Jul-20 01:39 AM
@Anonymous it does not show any option such as Colab in my drive; should i install that separately
@Anonymous Go to colab.research.google.com ,Sign in using your Gmail account. And you are ready to use it.
👍 1
Avatar
Anonymous 30-Jul-20 01:40 AM
Thanks @Anonymous Cat 🐈, I'll update my post 🙂
👍 1
Avatar
Anonymous 30-Jul-20 01:43 AM
@Anonymous looks like u can only upload notebooks and not folders etc.. in IBMQ or is there a way around it
Avatar
Anonymous 30-Jul-20 01:43 AM
PySCF successfully installed
@Anonymous looks like u can only upload notebooks and not folders etc.. in IBMQ or is there a way around it
@Anonymous we can only upload notebooks .
Avatar
Anonymous 30-Jul-20 01:44 AM
@Anonymous looks like u can only upload notebooks and not folders etc.. in IBMQ or is there a way around it
@Anonymous Yeah, I tried to upload other things, but importing them in the notebook you're working with isn't trivial
Avatar
Anonymous 30-Jul-20 01:44 AM
oh ok thx
@Anonymous were u able to do the install on Wind
windows
if yes can u share the steps
Avatar
Anonymous 30-Jul-20 01:46 AM
@Anonymous were u able to do the install on Wind
@Anonymous i am not using windows.
Avatar
Anonymous 30-Jul-20 01:46 AM
oh ok 🙂
Avatar
Anonymous 30-Jul-20 01:49 AM
Lab 8 need to be submitted?
Avatar
Anonymous 30-Jul-20 01:49 AM
>
oh ok 🙂 @Anonymous this worked for me.
Avatar
Anonymous 30-Jul-20 01:50 AM
Unfortunately, this doesn't work on Windows 😦
Avatar
Anonymous 30-Jul-20 01:53 AM
Unfortunately, this doesn't work on Windows 😦
@Anonymous We require only pyscf and then we can run lab 8 notebook.
Avatar
Anonymous 30-Jul-20 01:54 AM
@Anonymous We require only pyscf and then we can run lab 8 notebook.
@Anonymous Yep, so many people were trying to install PySCF through pip or conda on Windows, and nothing worked 😦
Avatar
Anonymous 30-Jul-20 01:55 AM
@Anonymous Yep, so many people were trying to install PySCF through pip or conda on Windows, and nothing worked 😦
@Anonymous Oh ok.
@Anonymous I am not sure about this.
Avatar
Anonymous 30-Jul-20 01:57 AM
^yep, also tried 😦
"Pypi provides a precompiled PySCF code (python wheel) which works on almost all Linux systems, and most of Mac OS X systems, and the ubuntu subsystems on Windows 10. If you already have pyscf installed, you can upgrade it to the new version:"
So it doesn't work purely on Windows 10.
Either people have to install Ubuntu subsystems, which does take a bit of time lol
Avatar
Anonymous 30-Jul-20 01:58 AM
^yep, also tried 😦
@Anonymous last section of the line i.e Ubuntu systems on windows 10 . Iam not sure regarding this. (edited)
Avatar
Anonymous 30-Jul-20 01:58 AM
Yeah we would need to install Ubuntu systems
A few years ago I tried to install an Ubuntu virtual machine on Windows and it took me a few hours lol (edited)
As well as a dual boot of ubuntu which took me an entire day XD (edited)
Yeah, probably not worth it now XD
Avatar
Anonymous 30-Jul-20 02:00 AM
Yeah we would need to install Ubuntu systems
@Anonymous But after installation of Ubuntu , all the other systems requirements, qiskit ,python notebook or some other files and then at the end PYSCF. I suppose.
Avatar
Anonymous 30-Jul-20 02:01 AM
@Anonymous But after installation of Ubuntu , all the other systems requirements, qiskit ,python notebook or some other files and then at the end PYSCF. I suppose.
@Anonymous Yeah 😦
Avatar
Anonymous 30-Jul-20 02:02 AM
@Anonymous Yeah 😦
@Anonymous For lab 8 is it a pre-requisite in order to run ?
Avatar
Anonymous 30-Jul-20 02:02 AM
I got pyscf working on WSL
Avatar
Anonymous 30-Jul-20 02:03 AM
@Anonymous For lab 8 is it a pre-requisite in order to run ?
@Anonymous Yeah, we can't run the second line, which means we can't run the 11th line of code in the first code block
Avatar
Anonymous 30-Jul-20 02:03 AM
I got pyscf working on WSL
@Anonymous can you share the steps, please
Avatar
Anonymous 30-Jul-20 02:04 AM
i don't know if it helps, but after installing everything (first pyscf and then qiskit) for python=3.7 in a separate environment, i needed a restart for python to recognize that those libraries are present
Avatar
Anonymous 30-Jul-20 02:04 AM
😮 WSL came out this year
ok i'm old lol
Avatar
Anonymous 30-Jul-20 02:05 AM
😮 WSL came out this year
@Anonymous That's the reason @Anonymous you are able to install . (edited)
Avatar
Anonymous 30-Jul-20 02:05 AM
I don't have WSL
I have a Virtual Machine of Ubuntu and a dual boot 🙂
omg this is a game changer XD
Avatar
Anonymous 30-Jul-20 02:06 AM
I don't have WSL
@Anonymous If u have ubuntu you should be able to manage (edited)
Avatar
Anonymous 30-Jul-20 02:07 AM
Yep, but for the people who have purely windows 🙂
Avatar
Anonymous 30-Jul-20 02:07 AM
Yep, but for the people who have purely windows 🙂
@Anonymous hmmm. That is what i was pointing out lab 8 requires a pre-requisite--underline in the image above. We can ask the mentors regarding this. (edited)
Avatar
Anonymous 30-Jul-20 02:10 AM
@Anonymous can you share the steps, please
@Anonymous okay, here's what i did (for WSL): 1. make a conda environment with python=3.7: $ conda create -n myenv python=3.7 2. $ conda activate myenv, followed by installation of pyscf and qiskit as follows: (myenv) $ pip install pyscf and then (myenv) $ pip install qiskit 3. install Jupyter inside myenv: (myenv) $ pip install jupyter 4. add the kernel to Jupyter: (myenv) $ python -m ipykernel install --user 5. I had to restart, but not sure if this is necessary for everyone.
i had qiskit installed with python 3.8 and it was a mess. so i had to remove everything and do the above
Avatar
Anonymous 30-Jul-20 02:10 AM
True, but I think for the people who don't have WSL, it's probably easier to upload the notebook to IBMQ/Colab, and everything works 🙂
👍 2
Avatar
Anonymous 30-Jul-20 02:11 AM
True, but I think for the people who don't have WSL, it's probably easier to upload the notebook to IBMQ/Colab, and everything works 🙂
@Anonymous That means it still can work on windows with IBMQ/Colab but not purely on windows env. Problem solved ?🙂
Avatar
Anonymous 30-Jul-20 02:12 AM
@Anonymous okay, here's what i did (for WSL):
>
1. make a conda environment with python=3.7: $ conda create -n myenv python=3.7 2. $ conda activate myenv, followed by installation of pyscf and qiskit as follows: (myenv) $ pip install pyscf and then (myenv) $ pip install qiskit 3. install Jupyter inside myenv: (myenv) $ pip install jupyter 4. add the kernel to Jupyter: (myenv) $ python -m ipykernel install --user 5. I had to restart, but not sure if this is necessary for everyone.
also, I'm guessing the above procedure will be similar to that required on Ubuntu...
Avatar
Anonymous 30-Jul-20 02:12 AM
@Anonymous That means it still can work on windows with IBMQ/Colab but not purely on windows env. Problem solved ?🙂
@Anonymous Yep, I think this is the easiest solution 🙂
👍 1
Avatar
Anonymous 30-Jul-20 02:30 AM
will our notebooks be saved in IBMQ later too ?
@Anonymous
can we have multiple notebooks over there?
@Anonymous Yes, and yes 🙂
Avatar
Anonymous 30-Jul-20 02:48 AM
this is what i got for the homework part.
Avatar
Anonymous 30-Jul-20 02:55 AM
this is what i got for the homework part.
btw, this part seems to kill my kernel each time I try. I don't know what's wrong. Help please anyone. (edited)
Avatar
Anonymous 30-Jul-20 03:01 AM
You might want to check the input qubitOp_tt to see if it's too big or unsolvable or something
👍 1
Avatar
Anonymous 30-Jul-20 03:04 AM
where am i going wrong?
Avatar
Anonymous 30-Jul-20 03:06 AM
I haven't gotten to this lab yet, but size: 124 looks concerning
Avatar
Anonymous 30-Jul-20 03:13 AM
Actually, it was told to reduce the qubits from 6 to 5, but mine is 4
Avatar
Anonymous 30-Jul-20 03:23 AM
@Anonymous In the lecture yesterday, as in the image attached below. Because "T" is Hermitian then the exponential should become one and that is a trivial result. I may have missed something. Can anyone please clarify this ?
Avatar
Anonymous 30-Jul-20 03:24 AM
Hey, a small doubt, I'm not a chem guy and I don't understand what "alpha or beta spin-orbital single excitations" means.
Avatar
Anonymous 30-Jul-20 03:30 AM
i believe alpha and beta are + and - 1/2 spins
and .taper is to be used to get the desired output of 5 qubit
👍 1
Avatar
Anonymous 30-Jul-20 03:34 AM
Yeah, but what does alpha /beta excitations mean? Like from +1/2 to -1/2 or what kind of excitations are described by this.
Avatar
Anonymous 30-Jul-20 03:41 AM
@Anonymous can you through some light on how to use this " .taper" ?
Avatar
Anonymous 30-Jul-20 03:43 AM
Use pauli_symm.taper(operator)[int]
Paulisymm cause the z2symmetries was found in there
Int is the tapering value
Avatar
Anonymous 30-Jul-20 03:45 AM
ok , i will try that
thanks
Avatar
Anonymous 30-Jul-20 03:50 AM
Avatar
Anonymous 30-Jul-20 04:45 AM
how to get score grade of all labs in one line ?
Avatar
Anonymous 30-Jul-20 04:51 AM
@Anonymous Go to a lab you've already completed, add force_commit=True to the grade call in the last cell, and re-run the notebook
Avatar
Anonymous 30-Jul-20 04:53 AM
for the lab we submitted we get full credit of that, irrespective of other things like cost and stuff right?
Avatar
Anonymous 30-Jul-20 04:57 AM
yes, lab correct, full credit
@Anonymous have u solved the homework part of lab 8?
Avatar
Anonymous 30-Jul-20 05:06 AM
------------18+6+++++++++++++++++++++++++++++++++++++++++++++++++258
17218
1
Avatar
Anonymous 30-Jul-20 05:06 AM
thanks @Anonymous
👍 1
Avatar
Anonymous 30-Jul-20 05:06 AM
]'8
Avatar
Anonymous 30-Jul-20 05:07 AM
@Anonymous have u solved the homework part of lab 8?
@Anonymous just woke up. I'm halfway through the lab lecture video
Avatar
Anonymous 30-Jul-20 05:07 AM
okk cool
Lab - 8 (homework)
Avatar
Anonymous 30-Jul-20 05:12 AM
Dude the lecture are great but there are lots of things he is assuming that we know but as a physics student i know those .
like whats h1 and h2
Avatar
Anonymous 30-Jul-20 05:13 AM
exactly, i couldn't follow that h1=h1 , h2=h2 part
Avatar
Anonymous 30-Jul-20 05:14 AM
then he jumps up telling h1 contains s1 orbital and p orbital of the LI as we wrote it first and i got lost.
👍 1
how are we supposed to do the project if we don't get proper detailed information
👍 1
Avatar
Anonymous 30-Jul-20 05:15 AM
will have to do RnD on these points from other materials, i think..
Avatar
Anonymous 30-Jul-20 05:17 AM
h1 refers to single particle interactions <i|Op|j> and h2 refers to 2 particle <ij|Op|km> terms from the hamiltonian
Avatar
Anonymous 30-Jul-20 05:18 AM
will have to get that from other resources
Short lecture on one-electron integrals of spin orbital expectation values. Terms in the total energy of a molecular system are either of the one-electron or two-electron form, depending on the number of electrons in the operator. One-electron terms include electron kinetic e...
👍 3
Avatar
Anonymous 30-Jul-20 05:21 AM
@Anonymous Should we watch all the videos in this Playlist to understand what was taught yesterday and what's going to be taught today??
Short lecture on one-electron integrals of spin orbital expectation values. Terms in the total energy of a molecular system are either of the one-electron or two-electron form, depending on the number of electrons in the operator. One-electron terms include electron kinetic e...
Avatar
Anonymous 30-Jul-20 05:23 AM
no no
just watch topics that are being used in lecture for general understanding
like 1 st then 11 then 12 then 14
i'm going to watch all
Avatar
Anonymous 30-Jul-20 05:25 AM
https://arxiv.org/abs/1808.10402https://arxiv.org/abs/1808.10402 This was shared yesterday by one of the mentor. It's quite good.
Avatar
Anonymous 30-Jul-20 05:26 AM
ya i have seen this
im going through some papers my self
like The Bravyi-Kitaev transformation for quantum computation of electronic structure
the transformation he talked about
this is the paper he was referring to.
Avatar
Anonymous 30-Jul-20 05:29 AM
>
This was shared yesterday by one of the mentor. It's quite good.
@Anonymous link saying article identifier not recognised in arxiv website (edited)
Avatar
Anonymous 30-Jul-20 05:30 AM
One of the most promising suggested applications of quantum computing is solving classically intractable chemistry problems. This may help to answer unresolved questions about phenomena like: high...
Avatar
Anonymous 30-Jul-20 05:30 AM
Thanx @Anonymous
Avatar
Anonymous 30-Jul-20 05:31 AM
all of you guys are sharing the same paper
@Anonymous link saying article identifier not recognised in arxiv website
@Anonymous because the link has be pasted twice
Avatar
Anonymous 30-Jul-20 05:39 AM
I'm lost again
its like i'm trying to watching an anime without subtitle (edited)
i can see whats happening but have no context why
Avatar
Anonymous 30-Jul-20 05:42 AM
Int is the tapering value
@Anonymous can you explain what the tapering value is? I guess it is either the alpha or beta sector?
Avatar
Anonymous 30-Jul-20 05:43 AM
@Anonymous can you explain what the tapering value is? I guess it is either the alpha or beta sector?
@Anonymous Preis i have a better question whats alpha and beta sector
Avatar
Anonymous 30-Jul-20 05:43 AM
spin down spin up
int the beginning we had 12 orbitals. 6 for one spin and 6 for the other
when freezing we froze 0 and 6, i.e. the 1s in spin up and the 1s in spin down
Avatar
Anonymous 30-Jul-20 05:46 AM
during the project can we say that the project is out off syllabus
@Anonymous Preis whats h1 and h2 please
Avatar
Anonymous 30-Jul-20 06:05 AM
okay here me out
i think the h1 is the matrix of hij that has been used in hij*ai(dager) * aj
am i correct?
Avatar
Anonymous 30-Jul-20 06:07 AM
yes
sorry had a call
its basically the bra -kets of the position dependent parts in the Hamiltonian
Avatar
Anonymous 30-Jul-20 06:08 AM
you have worked with quantum chemistry
i want this guy in my group. more like take me in your group
😶 please
Avatar
Anonymous 30-Jul-20 06:11 AM
No, I've studied theoretical physics
Avatar
Anonymous 30-Jul-20 06:13 AM
doesn't matter take me in
Avatar
Anonymous 30-Jul-20 06:15 AM
I have no group yet.You mean the final project?
Avatar
Anonymous 30-Jul-20 06:15 AM
ya but they are going to make it random
lets make a secret group
Avatar
Anonymous 30-Jul-20 06:16 AM
🙂
I don't know yet if I have time for this. I am working full time and the last two weeks really take a lot of energy in addition to that 😉 but I let you know
Avatar
Anonymous 30-Jul-20 06:18 AM
okay😟
Avatar
Anonymous 30-Jul-20 06:18 AM
In any case, the videos you posted before describe the integral very well
Avatar
Anonymous 30-Jul-20 07:05 AM
@Anonymous Preis tapering value defines the sector to be tapered
Avatar
Anonymous 30-Jul-20 07:29 AM
Hey @Anonymous , thank you for sharing these videos! I was also having the same problem as "i can see whats happening but have no context why"
Avatar
Anonymous 30-Jul-20 07:32 AM
from what I understand - the first symmetry (ZIIIIIII)is caused by the fact that the number of particles is therefore preserved and the parity, the next symmetry is caused by the fact that the spin is conserved (1 + 2 + 3 + 4 -orbitals with the same spin) The third symmetry I suspect shows us that one of the orbitals 3 and 4 also preserves its degree of occupancy. (I suspect that they are not occupied) Can anyone clarify me? What is the correct answer?
Avatar
Anonymous 30-Jul-20 07:59 AM
Does anyone know whether it's possible to download the crowdcast videos?
Avatar
Anonymous 30-Jul-20 08:04 AM
Does anyone know whether it's possible to download the crowdcast videos?
@Anonymous you can get them from youtube https://www.youtube.com/playlist?list=PLOFEBzvs-VvqPzAH4jwcHbV_rJz2_l9B6
Avatar
Anonymous 30-Jul-20 08:08 AM
thanks
Avatar
Anonymous 30-Jul-20 08:10 AM
@Anonymous Preis tapering value defines the sector to be tapered
@Anonymous thanks: can you be more specific. Is my guess correct, i.e. it's the alpha or beta sector? In the lab I chose taper_values = [0] since I thought the X in the Pauli symmetry is on position 4 of 6 which should be the alpha sector. Is this approach correct
Avatar
Anonymous 30-Jul-20 08:12 AM
Avatar
Anonymous 30-Jul-20 08:26 AM
the 0,1,2 they pick the list from possible tapering values
Avatar
Anonymous 30-Jul-20 08:46 AM
Does anyone know whether it's possible to download the crowdcast videos?
@Anonymous on windows? use IDM on linux? use XDM or u can download youtube videos using savefrom[google it] or vlc[using m3u8 link]
Avatar
Anonymous 30-Jul-20 08:53 AM
or youtube-dl (cross-platform)
Avatar
Anonymous 30-Jul-20 09:16 AM
does anyone know where I can find the lecture notes for yesterday (day8)?\
Avatar
Anonymous 30-Jul-20 09:19 AM
no official notes yet, see #memorable-lecture-notes for unofficial notes
Avatar
Anonymous 30-Jul-20 09:19 AM
@Anonymous Thanks!
👍 1
Avatar
Anonymous 30-Jul-20 09:41 AM
@Anonymous Registration link for final project is not working?? Can you please look into this??
Avatar
Anonymous 30-Jul-20 09:50 AM
@Anonymous Registration link for final project is not working?? Can you please look into this??
@Anonymous SEN where did you get the link from
Avatar
Anonymous 30-Jul-20 09:51 AM
Avatar
Anonymous 30-Jul-20 09:52 AM
did you guys got a mail or something
Avatar
Anonymous 30-Jul-20 09:52 AM
Avatar
Anonymous 30-Jul-20 09:52 AM
Follow the announcements
Avatar
Anonymous 30-Jul-20 09:54 AM
@Anonymous Registration link for final project is not working?? Can you please look into this??
@Anonymous SEN isnt working for me
Avatar
Anonymous 30-Jul-20 09:56 AM
Avatar
Anonymous 30-Jul-20 09:56 AM
did you guys got a mail or something
@Anonymous its not even allowing me open the linked website....showing "restricted to specific domain"
Avatar
Anonymous 30-Jul-20 09:56 AM
@Anonymous . I have a question on the qubit fabrication process: Are the symmetries/asymmetries in the qubit fabrication meant for a specific reason? It seems there is a up-down symmetry but a left-right asymmetry in the fabrication of the resonators and qubit positions... how is that planned? (edited)
Avatar
Anonymous 30-Jul-20 09:57 AM
@Anonymous its not even allowing me open the linked website....showing "restricted to specific domain"
@Anonymous SEN they are working on it check this https://discordapp.com/channels/729706617951485954/733262167649812520/738394355131220018
Avatar
Anonymous 30-Jul-20 09:58 AM
@Anonymous thanks
Avatar
Anonymous 30-Jul-20 09:58 AM
@Anonymous yep....just saw the previous message .......Thank you
Avatar
Anonymous 30-Jul-20 10:00 AM
@Anonymous . I have a question on the qubit fabrication process:
>
Are the symmetries/asymmetries in the qubit fabrication meant for a specific reason? It seems there is a up-down symmetry but a left-right asymmetry in the fabrication of the resonators and qubit positions... how is that planned?
@Anonymous Not sure I understand which symmetry you are referring to
Avatar
Anonymous 30-Jul-20 10:30 AM
@Anonymous I got this. Is it correct?
Avatar
Anonymous 30-Jul-20 10:35 AM
@Anonymous You're supposed to have 5 qubits as there are only 3 symmetries, at least that is what I understood...
Avatar
Anonymous 30-Jul-20 10:36 AM
@Anonymous You're supposed to have 5 qubits as there are only 3 symmetries, at least that is what I understood...
@Anonymous Thanks. I' ll check through it.
Avatar
Anonymous 30-Jul-20 10:37 AM
@Anonymous If you get it to work, dm if you want/can, I've been stuck there cause some qiskit function didn't want to work xD
👍 1
Avatar
Anonymous 30-Jul-20 11:09 AM
For lab5, I get this error. Why it does not see my grading_tools file? Any idea how to handle this? Many thanks.
Avatar
Anonymous 30-Jul-20 11:11 AM
For lab5, I get this error. Why it does not see my grading_tools file? Any idea how to handle this? Many thanks.
@Anonymous Hi, your directory where you're running your Jupyter notebook should look like this 🙂
Avatar
Anonymous 30-Jul-20 11:12 AM
@Anonymous Hi, your directory where you're running your Jupyter notebook should look like this 🙂
@Anonymous I will try now, many thanks for the help.
Avatar
Anonymous 30-Jul-20 11:31 AM
@Anonymous Not sure I understand which symmetry you are referring to
@Anonymous Lanes The micrograph of the 5 qubit processor that Abhinav showed in the lecture today.... I'm referring to that, but if someone flashes that (or once we get the notes) I'll be able to point out better.
Avatar
Anonymous 30-Jul-20 11:33 AM
@Anonymous Hi, your directory where you're running your Jupyter notebook should look like this 🙂
@Anonymous again 😢 i think i am doing something wrong but could not detect it.
Avatar
Anonymous 30-Jul-20 11:34 AM
Guys when are the labs due
Avatar
Anonymous 30-Jul-20 11:35 AM
2nd august
Avatar
Anonymous 30-Jul-20 11:35 AM
cool thx
👍 1
Avatar
Anonymous 30-Jul-20 11:47 AM
We don't need to submit Lab8 right? It'll be automatically graded, like Lab7, isn't it?
Avatar
Anonymous 30-Jul-20 11:48 AM
yup @Anonymous
Avatar
Anonymous 30-Jul-20 11:50 AM
@Anonymous This is something I am having difficulty in understanding. Once you have a qubit Hamiltonian, how do you map it to a circuit? For example if I take the 1D Ising model Hamiltonian then what will be the corresponding circuit? Any explanations or references are welcome. Thanks!
👍 1
Avatar
Anonymous 30-Jul-20 11:55 AM
why can the rabi oscillation be arbitrary amplitude between ground and excited state? Shouldn't the oscillations look like a square wave rather than a sine, since there can be no change in state unless required amount of energy is applied and we are experimenting on a single qubit? @Anonymous
Avatar
Anonymous 30-Jul-20 11:55 AM
I don't want lectures to be over 😦 This was so much fun
💯 6
Avatar
Anonymous 30-Jul-20 11:57 AM
Mee to @Anonymous
me too 😂
😆 1
Avatar
Anonymous 30-Jul-20 11:57 AM
>
why can the rabi oscillation be arbitrary amplitude between ground and excited state? Shouldn't the oscillations look like a square wave rather than a sine, since there can be no change in state unless required amount of energy is applied and we are experimenting on a single qubit? @Anonymous @Anonymous the probability of a state change oscillates as a function of the drive amplitude. the experiment is run many times and the results of each shot are averaged, so the vertical axis reflects a probability even though each individual shot gives only 0 or 1
💯 4
Avatar
Anonymous 30-Jul-20 11:57 AM
@Anonymous Hi, your directory where you're running your Jupyter notebook should look like this 🙂
@Anonymous Finally did it, thanks 🙂
Avatar
Anonymous 30-Jul-20 11:58 AM
@Anonymous Finally did it, thanks 🙂
@Anonymous No problem 🙂
Avatar
Anonymous 30-Jul-20 12:00 PM
@Anonymous does that mean coordinate (0.1, -2) sometimes has |1> state even though the excitation amplitude wasn't enough to excite from ground state? (edited)
Avatar
Anonymous 30-Jul-20 12:03 PM
Is there an issue with installing qiskit from the master branch (lab 7 requirements) on windows?
I tried running that command (!pip install -U -r grading_tools/requirements.txt) and it hung for 3 hours until I stopped it, so I tried pip install from powershell and it resulted in this error: Failed to build qiskit-aer ERROR: Could not build wheels for qiskit-aer which use PEP 517 and cannot be installed directly
There was more to the error than just that but it was pages of stuff
Avatar
Anonymous 30-Jul-20 12:06 PM
Is todays lab the last one?
Avatar
Anonymous 30-Jul-20 12:06 PM
Is there an issue with installing qiskit from the master branch (lab 7 requirements) on windows?
@Anonymous Ramachandran yes I was facing the same issue, I ran the other cells and it worked fine
👍 1
Avatar
Anonymous 30-Jul-20 12:06 PM
Is todays lab the last one?
@Anonymous Yep 😦
😥 2
Avatar
Anonymous 30-Jul-20 12:06 PM
@Anonymous Ramachandran yes I was facing the same issue, I ran the other cells and it worked fine
@Anonymous Okay, thanks!
👍 1
Avatar
Anonymous 30-Jul-20 12:11 PM
Was Spoiler for Lab 7 posted?
Avatar
Anonymous 30-Jul-20 12:13 PM
Lab 7 and 8 is a free for all
As far as I know
You don't need to submit, just follow with the labs
Avatar
Anonymous 30-Jul-20 12:13 PM
Was Spoiler for Lab 7 posted?
@Anonymous The solution of Lab 7 was included in the zip file called ex1-sol.ipynb (edited)
Avatar
Anonymous 30-Jul-20 12:14 PM
Thanks! I see it now
Avatar
Anonymous 30-Jul-20 12:26 PM
The error mitigation technique showed in the last couple of slides doesn't seem to be in the qiskit textbook, or is it?
Avatar
Anonymous 30-Jul-20 01:04 PM
does anyone know it's going to work with the teams for the final project?
do we have ot find our own team?
Avatar
Anonymous 30-Jul-20 01:05 PM
Nah they'll assign them randomly
According to your time zone and other stuff
Avatar
Anonymous 30-Jul-20 01:11 PM
In lab8 what is this basis? what is tis refering to?
Avatar
Anonymous 30-Jul-20 01:19 PM
When is last day for labs submission?
Avatar
Anonymous 30-Jul-20 01:20 PM
You don't need to submit, just follow with the labs
@Anonymous What about 9th
Avatar
Anonymous 30-Jul-20 01:25 PM
In lab8 what is this basis? what is tis refering to?
@Anonymous the fermionic modes, called orbitals in the current context of molecules and electrons, can be expanded as a linear combination of spatial functions from a set. this set is known as a basis set, and the operators are represented as matrices in this basis (for e.g., H as an operator can instead be represented as H_ij, where i and j are indices for two functions from this set, and H_ij = <i|H|j>. H_ij gives the "ij" element of the matrix representing H, the operator). these basis functions are often gaussian functions (of the form exp(-r^2)), and they are used to approximate Slater functions (of the form exp(-r), which are more accurate spatial representations of the said orbitals, generally speaking, but whose integrals are tough to calculate). the "sto" part refers to how a bunch of gaussian fns ("3g", so 3 gaussian fns) are linearly combined to give u one Slater-type orbital, per fermionic mode. this basis set is a standard one (and there are others, too). for lab 8, u need to know what kind of basis set u are using so that it gives u the right integrals, which are denoted as h1 and h2 in that notebook, as u need them to get the exact electronic energy.
i would refer u to any standard introductory material on basis sets, as it is a basic tool for quantum chemistry, but there are so many subtleties to it! this set of notes is a pretty good starting point, tho (Dr. Sherrill's notes and slides on other topics in quantum chemistry are also great resources in general for introduction to the subject): http://vergil.chemistry.gatech.edu/courses/chem6485/pdf/basis-sets.pdf
Avatar
Anonymous 30-Jul-20 01:32 PM
@Anonymous ahhhh so these basis sets are used to compute the one and two body integrals?
👍 2
So as to approximate these "chi's" (the wavefunctions) (edited)
👍 1
Avatar
Anonymous 30-Jul-20 01:34 PM
yep. altho, i will be careful and just specify that my yep is conditioned on those chi's being orbitals themselves. in some quantum chemsitry textbooks, chi are the non-orthogonal basis functions usually. but i think in this case they were referred to as an orthogonal set of orbitals by Antonio
Avatar
Anonymous 30-Jul-20 01:35 PM
At this point it's good enough for me to know what they're used for 😅 I'll look dive into it more down the road
👍 1
thank you
👍 1
Another question (sorry...): In the one body matrix are the diagonal terms the eigenstates of the fermionic modes? In the lab we froze the orbitals 0 and 6 because their eigenvalues were way too far off from the other ones, but what if we had some other value off diagonal that was very different from all the other entries?
I'm guessing that off diagonals dictate some sort of correlation between modes like a hopping thing, so if for example the entry [2,8] was something ridiculous like -20 then would we expect the entry [8,2] to also be -20 and would we be able to freeze anything?
Avatar
Anonymous 30-Jul-20 01:49 PM
In lecture 8, Antonio showed a slide with different applications of VQE. One was Hamiltonian averaging. Could someone spot more light on that or suggest some good materials?
Avatar
Anonymous BOT 30-Jul-20 01:50 PM
Your hand has been raised! A mentor will drop in as soon as they are available.
Avatar
Anonymous 30-Jul-20 02:14 PM
STO-nG basis sets are minimal basis sets, where n {\displaystyle n} primitive Gaussian orbitals are fitted to a single Slater-type orbital (STO). n {\displaystyle n} originally took the value...
@Anonymous it refers to Slater type orbitals, are orbitals used in quantum chemistry instead of hydrogen orbitals
Does someone understand how to reduce the symmetry of last lab
I appreciate any help with that one in order to get intuition of the problem.
Avatar
Anonymous 30-Jul-20 02:20 PM
I'm guessing that off diagonals dictate some sort of correlation between modes like a hopping thing, so if for example the entry [2,8] was something ridiculous like -20 then would we expect the entry [8,2] to also be -20 and would we be able to freeze anything?
@Anonymous this is what I think is happening for the UCCSD method: when we "freeze" orbitals, all we are saying is "I will not involve the indices of the frozen eigenstates in the expansion of the excitation operator T". We still do calculate the off-diagonal elements. The freezing affects how we write our bit-string representation (or in other words, how we write our wave-function, and what determinants we include). By freezing 0 and 6, we say our wave-function will NOT have contributions from |011100000010> (where I have "annihilated" energetically lowest eigenstate (0, alpha) and "created" energetically highest eigenstate (6, alpha)) or |101100000001> ((0, beta) annihilated, (6, beta) created), nor from |001100000011>, where I have now annihilated 0 (both alpha and beta) and created 6 (both alpha and beta). I will refrain from commenting on what the off-diagonal elements would represent here, as that'll require some more thought on my part, but they are important quantities to get the energy right. One instance that comes to mind: if element [2,6] has significant value, freezing 6 is not wise, because otherwise u will never get that element's contribution unless 6 is included in the expression for T (the excitation operator) {all of this for LiH} (edited)
Avatar
Anonymous 30-Jul-20 02:23 PM
I'm not sure if anyone has completed the lab yet, but I got lab9/ex1 incorrect (the measure_xx_circuit) and I followed the setup from the measure_zz_circuit. Is it wrong to assume I'd just run xx_meas.measure_all() on the circuit and return?
😫 1
Avatar
Anonymous 30-Jul-20 02:24 PM
So, I'm still working on Lab 8 and looking to apply that last symmetry, which is ZZIZZI, but I'm confused how to do that. Is it done analytically and if so there are 175 terms! If it is done through the Z2Symmetries, then I'm unclear what to try. Has anyone already experimented with this? I think the point is that we're looking to find which additional qubit we are removing, right?
Avatar
Anonymous 30-Jul-20 02:26 PM
I'm not sure if anyone has completed the lab yet, but I got lab9/ex1 incorrect (the measure_xx_circuit) and I followed the setup from the measure_zz_circuit. Is it wrong to assume I'd just run xx_meas.measure_all() on the circuit and return?
@Anonymous Same here
Avatar
Anonymous 30-Jul-20 02:26 PM
@Anonymous Same here
@Anonymous Sourounis nope. i recalled X = HZH
and it worked
Avatar
Anonymous 30-Jul-20 02:27 PM
Ya X = HZH
👍 3
Avatar
Anonymous 30-Jul-20 02:28 PM
ah thanks you guys
💯 1
Avatar
Anonymous 30-Jul-20 02:38 PM
So, I'm still working on Lab 8 and looking to apply that last symmetry, which is ZZIZZI, but I'm confused how to do that. Is it done analytically and if so there are 175 terms! If it is done through the Z2Symmetries, then I'm unclear what to try. Has anyone already experimented with this? I think the point is that we're looking to find which additional qubit we are removing, right?
@Anonymous Okay, so I'll answer my own question. It seems you just have to call taper() on the last returned symmetries object and it'll do it all for you. Was thinking I had to do more work with this one! So, it looks like the results returned from Z2Symmetries.find_Z2_symmetries(qubitOp_t) already give you the candidate qubit that would be removed and you simply have to apply to get the new operation.
💯 3
To confirm that I found that if I call it again on one of the tapered ops it then returns no more symmetries, which makes sense
Also related to today's lecture, does anyone know what to do with the removed qubits after calculations. How do you factor those back in?
Avatar
Anonymous 30-Jul-20 02:44 PM
@Anonymous Thank you so much for the detailed answer I have so many questions, that lab has me way too lost, starting on the symmetries and ending in the UCCSD... it's gonna be a tough challenge for next week XD
👍 1
I'm not sure if anyone has completed the lab yet, but I got lab9/ex1 incorrect (the measure_xx_circuit) and I followed the setup from the measure_zz_circuit. Is it wrong to assume I'd just run xx_meas.measure_all() on the circuit and return?
@Anonymous Remember that you want to measure the expectation value of XX, so, to be in accordance to the other function defined below, its not enough to just measure things, you need the post ansatz rotations, you need to measure in the X basis in both qubits (edited)
👍 2
oh, someone already answered to you, sorry
Avatar
Anonymous 30-Jul-20 02:47 PM
👍 1
Avatar
Anonymous 30-Jul-20 02:49 PM
@Anonymous no i appreciate it thanks!
Avatar
Anonymous 30-Jul-20 02:49 PM
is the hamitonian given in the lab the actual H2 molecule hamiltonian?
Avatar
Anonymous 30-Jul-20 02:50 PM
When calling measure_xx, I'm getting this error – anyone else experiencing this?
Avatar
Anonymous 30-Jul-20 02:51 PM
did u run the measure_all() method? i dont think ur circuit has measurements gates
@Anonymous so there arent any counts
Avatar
Anonymous 30-Jul-20 03:03 PM
@Anonymous Thank you so much for the detailed answer I have so many questions, that lab has me way too lost, starting on the symmetries and ending in the UCCSD... it's gonna be a tough challenge for next week XD
@Anonymous clarification: i arranged my bit-string in the reply above as |alpha beta alpha beta ...>, but in the labs it is |alpha alpha ... beta beta>.
Avatar
Anonymous 30-Jul-20 03:05 PM
I'm not sure if anyone has completed the lab yet, but I got lab9/ex1 incorrect (the measure_xx_circuit) and I followed the setup from the measure_zz_circuit. Is it wrong to assume I'd just run xx_meas.measure_all() on the circuit and return?
@Anonymous Did the same
👍 1
Avatar
Anonymous 30-Jul-20 03:23 PM
What did you guys get in the bonus exercises in lab 9? (especially Bonus 2)
Avatar
Anonymous 30-Jul-20 03:39 PM
Ya X = HZH
@Anonymous I am still a little lost on this.
Avatar
Anonymous 30-Jul-20 03:41 PM
okay
H = [[1,1],[1,-1]]/sqr(2) (edited)
Z = [[1,0],[0,-1]]
ZH = [[1,1],[-1,1]]/sqr(2) (edited)
Avatar
Anonymous 30-Jul-20 03:44 PM
H = [[1,1],[1,1]]/sqr(2)
@Anonymous > H = [[1,1],[1,-1]]/sqr(2)
Avatar
Anonymous 30-Jul-20 03:44 PM
HZH = [[0,1],[1,0]]
@Anonymous > H = [[1,1],[1,-1]]/sqr(2)
@Anonymous thanks i allmost forgot about the minus
Avatar
Anonymous 30-Jul-20 03:50 PM
Ya X = HZH
@Anonymous where exactly?
Avatar
Anonymous 30-Jul-20 03:51 PM
@Anonymous where exactly?
@Anonymous Through matrix multiplication he showed that X = HZH 🙂 (edited)
Avatar
Anonymous 30-Jul-20 03:52 PM
What did you guys get in the bonus exercises in lab 9? (especially Bonus 2)
@Anonymous I am still trying to learn how to use qiskit to write the matrix... maybe with Pauli ?? (I know how to do it with Mathematica!) (edited)
Avatar
Anonymous 30-Jul-20 03:58 PM
ya it can be used for gate reduction as well
like if your code has HXH of HcXH then you can replace it with Z or cZ or you have HZH then X and HcZH then cX
Avatar
Anonymous 30-Jul-20 04:06 PM
I went a different route and it worked for me.
Avatar
Anonymous 30-Jul-20 04:08 PM
what did you do
Avatar
Anonymous 30-Jul-20 04:08 PM
in the Bonus 2, how is the "matrix multiplication" of a tensor product of the two-quibit operators/matrices?
Avatar
Anonymous 30-Jul-20 04:08 PM
I went a different route and it worked for me.
@Anonymous Chakrabarti the easiest way was going to IBM experience and putting gates (edited)
Avatar
Anonymous 30-Jul-20 04:11 PM
What is the last date to submit the lab assignments?
Avatar
Anonymous 30-Jul-20 04:11 PM
2nd
aug
Avatar
Anonymous 30-Jul-20 04:12 PM
I went a different route and it worked for me.
@Anonymous Chakrabarti What is the other way you followed than the gates one?
Avatar
Anonymous 30-Jul-20 04:16 PM
Hi @Anonymous long time no see
👍 1
Avatar
Anonymous 30-Jul-20 04:18 PM
can someone tell me how to add this X=HZH to my code for lab 9. I still don't get it
Avatar
Anonymous 30-Jul-20 04:18 PM
look
you dont have to add X = HZH
we were working with <psi|Z|psi>
to get the expectation value of X in Z form (edited)
we need to convert X into Z
we do it using X = HZH
then we get <psi|X|psi> as <psi|HZH|psi>
and then <psi.H|Z|H.psi>
if you get till this(its just shifting operators , general QM) (edited)
Avatar
Anonymous 30-Jul-20 04:21 PM
I'm getting : Grading... lab9/ex1 - ❌ Failed: You do not have the correct circuit. Grading... lab9/ex2 - 🎉 Correct Grading... lab9/ex3 - 🎉 Correct how is that possible if ex2 and ex3 depend on ex1?
Avatar
Anonymous 30-Jul-20 04:21 PM
I'm getting : Grading... lab9/ex1 - ❌ Failed: You do not have the correct circuit. Grading... lab9/ex2 - 🎉 Correct Grading... lab9/ex3 - 🎉 Correct
>
how is that possible if ex2 and ex3 depend on ex1?
@Anonymous U you got the xx part wrong
Avatar
Anonymous 30-Jul-20 04:22 PM
I'm getting : Grading... lab9/ex1 - ❌ Failed: You do not have the correct circuit. Grading... lab9/ex2 - 🎉 Correct Grading... lab9/ex3 - 🎉 Correct
>
how is that possible if ex2 and ex3 depend on ex1?
@Anonymous U this is my situation too
Avatar
Anonymous 30-Jul-20 04:22 PM
well, that's what I'm asking, how is that possible? without the xx part ex2 and ex3 don't work
Avatar
Anonymous 30-Jul-20 04:23 PM
if you get till this(its just shifting operators , general QM)
@Anonymous from here you can change your |psi> you were using earlier and place a H gate at the last to make it |H.psi> and then use that to measure X
Avatar
Anonymous 30-Jul-20 04:24 PM
@Anonymous from here you can change your |psi> you were using earlier and place a H gate at the last to make it |H.psi> and then use that to measure X
@Anonymous I'll try. thanks
Avatar
Anonymous 30-Jul-20 04:24 PM
well, that's what I'm asking, how is that possible? without the xx part ex2 and ex3 don't work
@Anonymous U because ex2 and ex3 only look for the new initial circuit you made not the whole
@Anonymous I'll try. thanks
@Anonymous if you dont get it ask i will explain in more simpler way (edited)
Avatar
Anonymous 30-Jul-20 04:24 PM
@Anonymous U because ex2 and ex3 only look for the new initial circuit you made not the whole
@Anonymous that doesn't make any sense
Avatar
Anonymous 30-Jul-20 04:25 PM
okay wait
hets_circuit_plus = ######## hets_circuit_minus = ######
the 2nd and 3rd just check these
they don't see whats their energy
just the circuit not the post classical calculation
@Anonymous U just for you the The energy of the trial state is -1.2236736779439998
and for the last one the energies should be -1.1615004820717998 -1.2806626926606
Avatar
Anonymous 30-Jul-20 04:31 PM
anyone any idea when will the certificates be given out?
Avatar
Anonymous 30-Jul-20 04:35 PM
anyone any idea when will the certificates be given out?
@Anonymous let the summer school end man
🤣 2
😆 2
Avatar
Anonymous 30-Jul-20 04:36 PM
@Anonymous let the summer school end man
@Anonymous 🤣🤣
@Anonymous Chakrabarti
>
What is the other way you followed than the gates one?
@Anonymous different route might have been an exaggeration on my part. 😅 Just used Ry
👍 1
Avatar
Anonymous 30-Jul-20 04:40 PM
and for the last one the energies should be -1.1615004820717998 -1.2806626926606
@Anonymous Hai @Anonymous U did you get this
Avatar
Anonymous 30-Jul-20 04:43 PM
in the Bonus 2, how is the "matrix multiplication" of a tensor product of the two-quibit operators/matrices?
@Anonymous Anderson There is probably a more elegant way to do it using qiskit, but I simply did everything with sympy, and found −1.85727495756904 for the minimum eigenvalule
Avatar
Anonymous 30-Jul-20 04:51 PM
@Anonymous Hai @Anonymous U did you get this
@Anonymous I'm not getting those
Avatar
Anonymous 30-Jul-20 04:57 PM
@Anonymous I'm not getting those
@Anonymous U values will change in each run, but you should be getting something not far from that
Avatar
Anonymous 30-Jul-20 04:58 PM
@Anonymous I'm not getting those
@Anonymous U They don't need to be exact, computers have rounding errors 🙂
Avatar
Anonymous 30-Jul-20 04:59 PM
@Anonymous Anderson There is probably a more elegant way to do it using qiskit, but I simply did everything with sympy, and found −1.85727495756904 for the minimum eigenvalule
@Anonymous numpy has numpy.kron() for the kronecker prod and numpy.linalg.eig() for eigenvalues as well
😍 1
Avatar
Anonymous 30-Jul-20 04:59 PM
I'm getting these -0.9550360935203999 -1.1285293745549998
Avatar
Anonymous 30-Jul-20 05:00 PM
@Anonymous U They don't need to be exact, computers have rounding errors 🙂
@Anonymous differences are due to probabilistic nature of measurement, not rounding errors in this case (edited)
Avatar
Anonymous 30-Jul-20 05:00 PM
@Anonymous U you need to add an H gate at the last of the circuit for each of the 2 qubits
Avatar
Anonymous 30-Jul-20 05:01 PM
@Anonymous U you need to add an H gate at the last of the circuit for each of the 2 qubits
@Anonymous Vizarreta I'll try that, thanks!
Avatar
Anonymous 30-Jul-20 05:02 PM
Let us know how it goes 😁
Avatar
Anonymous 30-Jul-20 05:03 PM
@Anonymous if you dont get it ask i will explain in more simpler way
@Anonymous Now, I have gotten it right but I didn't use the HZH idea. I used RY instead
👍 1
Avatar
Anonymous 30-Jul-20 05:04 PM
@Anonymous Now, I have gotten it right but I didn't use the HZH idea. I used RY instead
@Anonymous show us your circuit plz
Avatar
Anonymous 30-Jul-20 05:05 PM
@Anonymous U you need to add an H gate at the last of the circuit for each of the 2 qubits
@Anonymous Vizarreta Was struggling with the HZH concept. After adding only the H gate it was completed successfully.Thanks!
👍 1
Avatar
Anonymous 30-Jul-20 05:06 PM
At first I just used the same code that we have above, the measure_all() part, then I got the error. What you should do before that is to add an H gate to the circuit for qubits 0 and 1, that's it.
@Anonymous Rajaram you're welcome!
Avatar
Anonymous 30-Jul-20 05:09 PM
At first I just used the same code that we have above, the measure_all() part, then I got the error. What you should do before that is to add an H gate to the circuit for qubits 0 and 1, that's it.
@Anonymous Vizarreta It worked out, thanks!. But, I don't understand why, could you explain a little bit? please
Avatar
Anonymous 30-Jul-20 05:11 PM
@Anonymous show us your circuit plz
@Anonymous
Avatar
Anonymous 30-Jul-20 05:18 PM
@Anonymous Vizarreta It worked out, thanks!. But, I don't understand why, could you explain a little bit? please
@Anonymous U
At first I just used the same code that we have above, the measure_all() part, then I got the error. What you should do before that is to add an H gate to the circuit for qubits 0 and 1, that's it.
@Anonymous Vizarreta Yeah, could you explain it please
Avatar
Anonymous 30-Jul-20 05:20 PM
@Anonymous RY(pi/2)[ [0.70710678, -0.70710678], [0.70710678, 0.70710678] ] H = [ [0.70710678, 0.70710678], [0.70710678, -0.70710678] ] i will say you got lucky (edited)
Avatar
Anonymous 30-Jul-20 05:21 PM
@Anonymous RY(pi/2)[ [0.70710678, -0.70710678], [0.70710678, 0.70710678] ] H = [ [0.70710678, 0.70710678], [0.70710678, -0.70710678] ] i will say you got luckey
@Anonymous can u explain the concept of the function entirely?
Avatar
Anonymous 30-Jul-20 05:21 PM
go there and read those
👍 1
i have explained it earlier
😀
Avatar
Anonymous 30-Jul-20 05:23 PM
can anybody send the code for applying the h gate.. don't know what, but I'm doing something wrong...
Avatar
Anonymous 30-Jul-20 05:23 PM
okay let me explain you and you will get it right
Avatar
Anonymous 30-Jul-20 05:24 PM
can anybody send the code for applying the h gate.. don't know what, but I'm doing something wrong...
@Anonymous circuit.h(qubit_number)
Avatar
Anonymous 30-Jul-20 05:24 PM
i guess he knows that by now. Its lab9
maybe he has some other problem
Avatar
Anonymous 30-Jul-20 05:25 PM
i guess he knows that by now. Its lab9
@Anonymous ahahah
Avatar
Anonymous 30-Jul-20 05:25 PM
@Anonymous circuit.h(qubit_number)
@Anonymous see what @Anonymous said if it helps (edited)
Avatar
Anonymous 30-Jul-20 05:25 PM
@Anonymous circuit.h(qubit_number)
@Anonymous thank you!
Avatar
Anonymous 30-Jul-20 05:26 PM
okay @Anonymous I'm officially sending you to lab 1
Avatar
Anonymous 30-Jul-20 05:26 PM
i guess he knows that by now. Its lab9
@Anonymous hahaha sure, just had stupid (more or less) typing mistake
Avatar
Anonymous 30-Jul-20 05:26 PM
don't mind me I'm just fooling around
😂 2
👀 2
Avatar
Anonymous 30-Jul-20 05:30 PM
okay @Anonymous I'm officially sending you to lab 1
@Anonymous ahahahaha
Avatar
Anonymous 30-Jul-20 05:30 PM
It is also explained in today's lecture, hour 01:38:34 😁
😊 2
Avatar
Anonymous 30-Jul-20 05:30 PM
It is also explained in today's lecture, hour 01:38:34 😁
@Anonymous Vizarreta Nice guy
👍 2
Avatar
Anonymous 30-Jul-20 05:34 PM
first time I submittes, ex2 & 3 were correct, just 1 was wrong, I fixed it and now 1 is correct and 2 & 3 wrong, somebody knows why?😆
Avatar
Anonymous 30-Jul-20 05:34 PM
first time I submittes, ex2 & 3 were correct, just 1 was wrong, I fixed it and now 1 is correct and 2 & 3 wrong, somebody knows why?😆
@Anonymous Heisenberg’s uncertainty principle
😂 2
Avatar
Anonymous 30-Jul-20 05:35 PM
@Anonymous Heisenberg’s uncertainty principle
@Anonymous Chakrabarti yup 😂
Avatar
Anonymous 30-Jul-20 05:35 PM
@Anonymous U @Anonymous To my understanding only looking at the circuit picture in the lab9 we ended measuring <ZZ>. For one qubit z=hxh, then applying the hadamard in the circuit as you did, zh=hxhh=hx so you transformed your measurement of z to x using hadamard gate. You then do this trick for both qubits.
Avatar
Anonymous 30-Jul-20 05:36 PM
@Anonymous Heisenberg’s uncertainty principle
@Anonymous Chakrabarti hahaha seems like
Avatar
Anonymous 30-Jul-20 05:41 PM
Hi! Has anyone information about how to register to the extra project?
Avatar
Anonymous 30-Jul-20 05:41 PM
It’s on #announcements
Avatar
Anonymous 30-Jul-20 05:41 PM
Hi! Has anyone information about how to register to the extra project?
@Anonymous https://discordapp.com/channels/729706617951485954/729710164546027629/738153714333777920
Avatar
Anonymous 30-Jul-20 05:42 PM
@Anonymous U @Anonymous To my understanding only looking at the circuit picture in the lab9 we ended measuring <ZZ>. For one qubit z=hxh, then applying the hadamard in the circuit as you did, zh=hxhh=hx so you transformed your measurement of z to x using hadamard gate. You then do this trick for both qubits.
@Anonymous Great explanation! is that the reason why we have xx = zz = counts['00'] + counts['11'] - counts['01'] - counts['10']? (edited)
Avatar
Anonymous 30-Jul-20 05:49 PM
So I am trying the bonus 2 in lab9. I want to understand how to create the H matrix? Can someone help?
Avatar
Anonymous 30-Jul-20 05:50 PM
So I am trying the bonus 2 in lab9. I want to understand how to create the H matrix? Can someone help?
@Anonymous Asthana you mean in the circuit?
Avatar
Anonymous 30-Jul-20 05:50 PM
@Anonymous Asthana you mean in the circuit?
@Anonymous U So in bonus 2 question, we need to diagonalize the H matrix to reach the ground state isn't it? (edited)
Avatar
Anonymous 30-Jul-20 05:52 PM
Oh, you mean the Hamiltonian, sorry I was thinking in the h gate
XX are tensor prodducts
maybe you can use numpy.kron(X,X), and so on with the other terms
Avatar
Anonymous 30-Jul-20 05:55 PM
Oh, you mean the Hamiltonian, sorry I was thinking in the h gate
@Anonymous U Ah my bad!
Avatar
Anonymous 30-Jul-20 05:56 PM
I haven't done it yet, but I think we have to do it that way
Avatar
Anonymous 30-Jul-20 06:04 PM
I got this value -1.868555057569039
Avatar
Anonymous 30-Jul-20 06:05 PM
So I am trying the bonus 2 in lab9. I want to understand how to create the H matrix? Can someone help?
@Anonymous Asthana As mentioned above, one way is to use sympy, which has TensorProduct, etc. An alternative is to use numpy
Avatar
Anonymous 30-Jul-20 06:05 PM
@Anonymous Asthana write the H using numpy.kron( , ), then compute the eigenvalues, pick the min
👍 1
Avatar
Anonymous 30-Jul-20 06:05 PM
@Anonymous U For zz you can see it if you take Z tensor Z, then imagine from left to right on the top of your matrix the labels '00', '01','10','11', and from top to bottom on the left hand side of your matrix the same labels in that order. Then you see it is the same as "|00>-|01>-|10>+|11>", keeping any constants away for simplification. Similarly we can say for xx, where now the x tensor x looks like a matrix with all 1's on the off-diagonal. However, we are free to change our matrix as far as I know, so we could make it look like our matrix for zz by so called "wiping" our matrix. If anyone knows a better or other explanation I'm happy to hear it, this is just my thoughts about it.
Avatar
Anonymous 30-Jul-20 06:07 PM
@Anonymous Asthana write the H using numpy.kron( , ), then compute the eigenvalues, pick the min
@Anonymous U Ah! Thanks guys!
Avatar
Anonymous 30-Jul-20 06:07 PM
>
@Anonymous Asthana As mentioned above, one way is to use sympy, which has TensorProduct, etc. An alternative is to use numpy @Anonymous you obtained the same value -1.868555057569039, right?
Avatar
Anonymous 30-Jul-20 06:09 PM
Nope. As mentioned above, I got −1.85727495756904
👍 3
Avatar
Anonymous 30-Jul-20 06:11 PM
Nope. As mentioned above, I got −1.85727495756904
@Anonymous Great! yes, I suppose that it's not exactly the same number, but it's still very close.
Avatar
Anonymous 30-Jul-20 06:17 PM
@Anonymous regarding the lab8, what is the operator IIIIZIII and why is it that symmetry together with ZIIIIIIII means the spin and charge conservation?
Avatar
Anonymous 30-Jul-20 06:20 PM
Nope. As mentioned above, I got −1.85727495756904
@Anonymous -1.85727496 yup This is the exact value I got too.
@Anonymous U must be some mistake! value -1.85727496 Angstrom seems correct (edited)
Avatar
Anonymous 30-Jul-20 06:22 PM
@Anonymous Asthana @Anonymous yes, I had a missing term, it's -1.8572749575690393
👍 2
Avatar
Anonymous 30-Jul-20 06:22 PM
Great!!
👍 2
This lab was the best for me as a chemist (of course)!! Enjoyed it alot. Thanks to the @Anonymous and Abhinav Kandala!!
Avatar
Anonymous 30-Jul-20 06:30 PM
I don't understand Bonus 1
are we suppose to do extrapolation or something like that?
This lab was the best for me as a chemist (of course)!! Enjoyed it alot. Thanks to the @Anonymous and Abhinav Kandala!! @Anonymous Asthana Abhinav Kandala Genius!, a great lecture and a great lab
Avatar
Anonymous 30-Jul-20 06:35 PM
are we suppose to do extrapolation or something like that?
@Anonymous U Simply use 100,1000 and 10000 counts and compare the difference in calculated value.
Avatar
Anonymous 30-Jul-20 06:36 PM
@Anonymous Asthana Thanks!
Avatar
Anonymous BOT 30-Jul-20 06:48 PM
Lecture and Lecture Note Links: Week 2 All lecture notes are available in #resources - check the pinned files!
[Day 6] Superconducting Qubits I: Quantizing a Harmonic Oscillator, Josephson Junctions Lecturer : Zlatko Minev Link to Recording | Password : qiskitday6 [Day 7] Superconducting Qubit II: Readout and Circuit QED, Calibrating a Qubit Frequency and Readout Lecturer : Zlatko Minev Link to Recording | Password : qiskitday7 [Day 8] Quantum Chemistry II: Going from Problem Description to Qubit Hamiltonian for H2 and LiH Lecturer : Antonio Mezzacapo Link to Recording | Password : qiskitday8 [Day 9] Quantum Chemistry II: Solving Qubit Hamiltonian for H2 and LiH using VQE Lecturer : Abhinav Kandala Link to Recording | Password : qiskitday9 [Day 10] "Careers in Quantum Computing" Live Panel Discussion Panelists : Jay Gambetta, Marina Radulaski, K. Birgitta Whaley, Steve Girvin, Monika Schleier-Smith, & John Preskill Moderated by Amira Abbas, Qiskit Advocate Link to Join
Avatar
Anonymous 30-Jul-20 06:57 PM
am I being too picky or is the Hamiltonian missing the YY operators?
Avatar
Anonymous 30-Jul-20 06:59 PM
am I being too picky or is the Hamiltonian missing the YY operators?
@Anonymous The hamiltonian is right, it's the same that we saw in the lecture
Avatar
Anonymous 30-Jul-20 07:00 PM
thank you @Anonymous U
Avatar
Anonymous BOT 30-Jul-20 07:32 PM
Summer School Check-In Week 2!
Share your feedback and support continued improvement (along with community research!). We appreciate you taking some time for this check in, and for letting us know how we are doing! SuperimposedSmileWhite :point_right: Share your feedback here! :point_left:
Avatar
Anonymous 30-Jul-20 07:34 PM
@Anonymous Asthana @Anonymous @Anonymous U I confirm ~ -1.8573
Avatar
Anonymous 30-Jul-20 07:53 PM
@Anonymous Asthana @Anonymous @Anonymous U I confirm ~ -1.8573
@Anonymous Preis 🙂
Avatar
Anonymous 30-Jul-20 07:57 PM
Hi, the first lab1 is wrong for my, some clue about it? ...
Avatar
Anonymous 30-Jul-20 07:57 PM
Any link course to read for lab 9?
Avatar
Anonymous 30-Jul-20 08:03 PM
That's all ? Correct answers: lab1:ex1, lab2:ex1, lab3:ex1, lab4:ex1, lab5:ex1, lab6:ex1a, lab6:ex1b, lab9:ex1, lab9:ex2, lab9:ex3 (edited)
Avatar
Anonymous 30-Jul-20 08:04 PM
That's all ?
@Anonymous Yep 🎉 🥳 🎊
Avatar
Anonymous 30-Jul-20 08:04 PM
@Anonymous thx!
Avatar
Anonymous 30-Jul-20 08:05 PM
@Anonymous can you help me for the computing gradient?
How to implement two angle1
Avatar
Anonymous 30-Jul-20 08:06 PM
@Anonymous can you help me for the computing gradient?
@Anonymous you'll be using
prepare_hets_circuit(depth, angle1, angle2)
function that you created above 🙂 (edited)
Avatar
Anonymous 30-Jul-20 08:08 PM
Did it but getting error
Avatar
Anonymous 30-Jul-20 08:10 PM
How to implement two angle1
@Anonymous It is already in arguments of the function 🙂
Avatar
Anonymous 30-Jul-20 08:10 PM
It's a typo in the notebook 🙂 (edited)
Put in angle 2 🙂
Avatar
Anonymous 30-Jul-20 08:11 PM
How to implement two angle1
@Anonymous You need to put two variables of angle1 in hets_circuit_plus and hets_circuit_minus
Avatar
Anonymous 30-Jul-20 08:11 PM
prepare_hets_circuit(depth=2, angle2 = pi/2)
is a typo.
prepare_hets_circuit(depth, angle1, angle2)
needs 3 arguments (edited)
Avatar
Anonymous 30-Jul-20 08:12 PM
I mean hets_circuit_plus has one variable alpha1 and hets_circuit_minus has another variable alpha1
and angle2 is same
prepare_hets_circuit(depth, angle1 , angle2 )
Avatar
Anonymous 30-Jul-20 08:15 PM
I mean hets_circuit_plus has one variable alpha1 and hets_circuit_minus has another variable alpha1
@Anonymous So what I did for hets_circuit_plus is correct? I should do the same for hets_circuit_minus
Avatar
Anonymous 30-Jul-20 08:16 PM
@Anonymous So what I did for hets_circuit_plus is correct? I should do the same for hets_circuit_minus
@Anonymous please use the function prepare_hets_circuit. yes, it is correct, just do the same for hets_circuit_minus (edited)
Avatar
Anonymous 30-Jul-20 08:19 PM
To confirm there is no deadline today 07/30 as originally planned for submission of the labs in the original email. Also, for the labs, how do we know what are we doing, how to receive the tasks and what are our labroles?
Avatar
Anonymous 30-Jul-20 08:21 PM
Hi guys, how can we verify that our lab work has been submitted?
I have been successfully running qiskit lab files on my machine but i am not sure if they are submitted to summer school?
Avatar
Anonymous 30-Jul-20 08:23 PM
Whenever you submit your lab, you'll see this 🙂
If you see something like this, it means it's submitted
Avatar
Anonymous 30-Jul-20 08:23 PM
@Anonymous please use the function prepare_hets_circuit. yes, it is correct, just do the same for hets_circuit_minus
@Anonymous Thanks
Avatar
Anonymous 30-Jul-20 08:34 PM
Anyone getting this error ? ex1
Avatar
Anonymous 30-Jul-20 08:35 PM
Anyone getting this error ? ex1
@Anonymous Hey, can you explain to me what you did in your
measure_xx_circuit(given_circuit)
function?
Avatar
Anonymous 30-Jul-20 08:36 PM
Anyone getting this error ? ex1
@Anonymous you need fix your circuit
Avatar
Anonymous 30-Jul-20 08:37 PM
@Anonymous Hey, can you explain to me what you did in your
measure_xx_circuit(given_circuit)
function?
@Anonymous In this i have done measure_all()
Avatar
Anonymous 30-Jul-20 08:37 PM
Ahhh you're missing one crucial step before measure_all()
Avatar
Anonymous 30-Jul-20 08:38 PM
Ahhh you're missing one crucial step before measure_all()
@Anonymous ?
Avatar
Anonymous 30-Jul-20 08:38 PM
@Anonymous ?
@Anonymous We want to measure <XX>
So we were working with
Wait mah LaTeX
Avatar
Anonymous 30-Jul-20 08:40 PM
@Anonymous We want to measure <XX>
@Anonymous did that x_meas.measure_all()
Avatar
Anonymous 30-Jul-20 08:41 PM
We were working with
=tex \langle Z \rangle
Avatar
Anonymous BOT 30-Jul-20 08:41 PM
🗑 1
Avatar
Anonymous 30-Jul-20 08:41 PM
Wait forget it
<Z> = <psi | Z | psi>
We want to get the expectation value of X in Z form
We want to write X in terms of Z
😅 1
This is done using X = HZH
^you guys can prove that
So now we want <X>
Which is
<X> = <psi | X | psi> = <psi | HZH | psi>
Avatar
Anonymous 30-Jul-20 08:43 PM
@Anonymous thanks got it but i think we have to implement this by using numpy matrices
Avatar
Anonymous 30-Jul-20 08:43 PM
Nope, only applying a gate 🙂
All you need to do is apply a gate to both qubits at the end 🙂
Avatar
Anonymous 30-Jul-20 08:44 PM
Nope, only applying a gate 🙂
@Anonymous To the zz_measure?
Avatar
Anonymous 30-Jul-20 08:45 PM
No right before you call measure_all in the x_meas
<X> = <psi | X | psi> = <psi | HZH | psi>
@Anonymous <psi | HZH | psi> = <psi H | Z | H psi>
do you see where i'm going XD
Avatar
Anonymous 30-Jul-20 08:47 PM
@Anonymous i was unnecessary getting confused trial state -1.049109555146 (edited)
Avatar
Anonymous 30-Jul-20 08:47 PM
It's <XX> = -1.0
(you're applying the H gate to both qubits)
right before measure_all()
Avatar
Anonymous 30-Jul-20 08:48 PM
yes
It's <XX> = -1.0
@Anonymous <XX>=-0.0126 is it correct? (edited)
Avatar
Anonymous 30-Jul-20 08:48 PM
Hi, anybody can help me with the measure_xx_circuit
Avatar
Anonymous 30-Jul-20 08:48 PM
@Anonymous Bernier Yep, join in 😄
I'm explaining it, see above 🙂
@Anonymous <XX>=-0.0126
@Anonymous Can I see your circuit?
Avatar
Anonymous 30-Jul-20 08:50 PM
@Anonymous ok i have apply to both the qubits H
Avatar
Anonymous 30-Jul-20 08:50 PM
@Anonymous ok i have apply to both the qubits H
@Anonymous Yaaaa 😄
Avatar
Anonymous 30-Jul-20 08:50 PM
3 am, will be back tomorrow. Thanks @Anonymous
Avatar
Anonymous 30-Jul-20 08:50 PM
3 am, will be back tomorrow. Thanks @Anonymous
@Anonymous Good night 😄
@Anonymous Bernier Do you have a question? 🙂
Avatar
Anonymous 30-Jul-20 08:51 PM
@Anonymous we have to apply HZH to both the qubits ?
Avatar
Anonymous 30-Jul-20 08:52 PM
Only H
Avatar
Anonymous 30-Jul-20 08:52 PM
@Anonymous got it. Thanks <xx>=-1.0 (edited)
Avatar
Anonymous 30-Jul-20 08:54 PM
Yayyyyy 🥳
Avatar
Anonymous 30-Jul-20 08:54 PM
@Anonymous how about the next section hets_circuit_plus ? i mean what we are supposed to do
Avatar
Anonymous 30-Jul-20 08:55 PM
Guys, I'll be back in 5-10 minutes, need to eat dinner 😊
@Anonymous how about the next section hets_circuit_plus ? i mean what we are supposed to do
@Anonymous I'll explain after :)
Avatar
Anonymous 30-Jul-20 08:55 PM
@Anonymous I'll explain after :)
@Anonymous No worries buddy.
Avatar
Anonymous 30-Jul-20 08:56 PM
@Anonymous thanks, I did read and apply the two h 🙂
Avatar
Anonymous 30-Jul-20 08:57 PM
@Anonymous thanks, I did read and apply the two h 🙂
@Anonymous Bernier did you get <xx>=-1.0
Avatar
Anonymous 30-Jul-20 08:57 PM
I don´t know how to make the bonus 2
Avatar
Anonymous 30-Jul-20 08:57 PM
I don´t know how to make the bonus 2
@Anonymous Bernier hey were you able to do computing gradients section
Avatar
Anonymous 30-Jul-20 08:58 PM
What is that part?
Avatar
Anonymous 30-Jul-20 09:00 PM
What is that part?
@Anonymous Bernier hets_circuit_plus = None , i am talking about this
Avatar
Anonymous 30-Jul-20 09:06 PM
Will this Discord server be deleted after August 2?
Avatar
Anonymous 30-Jul-20 09:11 PM
I don´t know how to make the bonus 2
@Anonymous Bernier you need to build the matrix of the Hamiltonian, like described in the beginning of the jupyter notebook, to do that you will have to define the Pauli matrices, do the tensor products needed, after that you will have to determine the eigenvalues of the Hamiltoninan and the lowest will be the ground state energy. You will need to import numpy and scipy.linalg
👍 1
Avatar
Anonymous 30-Jul-20 09:11 PM
@Anonymous Bernier hets_circuit_plus = None , i am talking about this
@Anonymous yes I solve it
Avatar
Anonymous 30-Jul-20 09:11 PM
Will this Discord server be deleted after August 2?
@Anonymous Discord Server is Shut Down Friday, August 7 - 11:59 PM EDT
😩 1
Hi everyone 😄
Avatar
Anonymous 30-Jul-20 09:11 PM
NumPy Linear Algebra Exercises, Practice and Solution: Write a NumPy program to compute the Kronecker product of two given mulitdimension arrays.
😍 1
Avatar
Anonymous 30-Jul-20 09:12 PM
@Anonymous Bernier you need to build the matrix of the Hamiltonian, like described in the beginning of the jupyter notebook, to do that you will have to define the Pauli matrices, do the tensor products needed, after that you will have to determine the eigenvalues of the Hamiltoninan and the lowest will be the ground state energy. You will need to import numpy and scipy.linalg
@Anonymous Thanks, I will read about it, Python is not my language 🙂
Avatar
Anonymous 30-Jul-20 09:13 PM
@Anonymous yes I solve it
@Anonymous Bernier we have to call the function and pass the angle with plus and minus value
Avatar
Anonymous 30-Jul-20 09:14 PM
yes, I created variables with the angles and depth and copy the prepare_hets_circuite lines. It said it is correct
👍 2
Avatar
Anonymous 30-Jul-20 09:15 PM
There's a typo in their notebook
prepare_hets_circuit(depth=2, angle2 = pi/2)
But when we defined the function prepare_hets_circuit
There are 3 arguments
prepare_hets_circuit(depth, angle1, angle2)
But yes, if you do what @Anonymous Bernier said, it will be correct 🙂
Avatar
Anonymous 30-Jul-20 09:17 PM
@Anonymous done with -1.0953546607134 -1.0920552653257998 Is it correct for energy plus and energy minus
Avatar
Anonymous 30-Jul-20 09:18 PM
@Anonymous I have -1.1596113282218 -1.2827204324403998
Avatar
Anonymous 30-Jul-20 09:29 PM
@Anonymous what about bonus 1 and bonus 2 (edited)
Thanks @Anonymous Bernier and @Anonymous
Avatar
Anonymous 30-Jul-20 09:43 PM
can i get a link for final assignment of LiH?
Avatar
Anonymous 30-Jul-20 09:51 PM
Avatar
Anonymous 30-Jul-20 10:06 PM
Did anyone finish bonus2? I wanted to crosscheck my answer.
✋ 1
Avatar
Anonymous 30-Jul-20 10:16 PM
Did anyone finish bonus2? I wanted to crosscheck my answer.
@Anonymous i did... did u get sthg below the value of energy u got using the trial state?
Avatar
Anonymous 30-Jul-20 10:25 PM
thank you @Anonymous
Avatar
Anonymous 30-Jul-20 10:37 PM
@Anonymous i did... did u get sthg below the value of energy u got using the trial state?
@Anonymous yes. The least value was around -1.8. Did you get the same?
I don't think this accounts for the nuclear energy shift
Avatar
Anonymous 30-Jul-20 10:38 PM
@Anonymous Heisenberg’s uncertainty principle
@Anonymous Chakrabarti Were you able to solve this? Happened to me too
Avatar
Anonymous 30-Jul-20 10:43 PM
Will Solutions to lab 9 be posted?
Avatar
Anonymous 30-Jul-20 10:46 PM
Will Solutions to lab 9 be posted?
@Anonymous Most likely tomorrow 🙂
👍 2
Avatar
Anonymous 30-Jul-20 10:46 PM
@Anonymous Chakrabarti
>
Were you able to solve this? Happened to me too
@Anonymous I was able to get all the solutions correct. But never got error for ex2 and ex3
Avatar
Anonymous 30-Jul-20 10:50 PM
Does anyone has the lab9 correct code? Mine is wrong and I do not know where may be my mistake.
Avatar
Anonymous 30-Jul-20 10:50 PM
Does anyone has the lab9 correct code? Mine is wrong and I do not know where may be my mistake.
@Anonymous Rosetti - YggBrasil Which part are you looking at?
Avatar
Anonymous 30-Jul-20 10:51 PM
ex1
Avatar
Anonymous 30-Jul-20 10:51 PM
@Anonymous yes. The least value was around -1.8. Did you get the same?
@Anonymous i got one higher than this, but i think we are aiming for only electronic energy as far as i can see. adding nuclear repulsion (the energy shift) will only drive this value up. mine is around the value of -1.3
Avatar
Anonymous 30-Jul-20 10:52 PM
@Anonymous Rosetti - YggBrasil See #support-reference as well 🙂
I can also take a look at what you're doing there 🙂
Avatar
Anonymous 30-Jul-20 10:54 PM
@Anonymous i got one higher than this, but i think we are aiming for only electronic energy as far as i can see. adding nuclear repulsion (the energy shift) will only drive this value up. mine is around the value of -1.3
@Anonymous hmm I did get an eigenvalue around that but the least was -1.8. You simply diagonalized the 4x4 Hamiltonian using the 5 matrices right?
Avatar
Anonymous 30-Jul-20 10:55 PM
yes, and then chose the lowest one
let me check this
@Anonymous hmm I did get an eigenvalue around that but the least was -1.8. You simply diagonalized the 4x4 Hamiltonian using the 5 matrices right?
@Anonymous yep, ~-1.3 is definitely my lowest eigenvalue
@Anonymous how did u build ur 2-qubit operator matrices? did u use numpy?
Avatar
Anonymous 30-Jul-20 10:57 PM
Yes
I've got the right form
Avatar
Anonymous 30-Jul-20 10:59 PM
I've got the right form
@Anonymous it seems so have I... i use np.outer to get my tensor products
and then just add them up per the expression at the top of the page
Avatar
Anonymous 30-Jul-20 11:00 PM
Yes that's what I did and used np. linalg.eig
Avatar
Anonymous 30-Jul-20 11:01 PM
i used the Hermitian counterpart: eigh
Avatar
Anonymous 30-Jul-20 11:01 PM
I fixed ex1 but that broke ex2 and ex3 lol?
Avatar
Anonymous 30-Jul-20 11:02 PM
i used the Hermitian counterpart: eigh
@Anonymous tried that as well. Doesn't change the answer
🤔 1
Avatar
Anonymous 30-Jul-20 11:02 PM
@Anonymous this is what I got
Avatar
Anonymous 30-Jul-20 11:03 PM
I fixed ex1 but that broke ex2 and ex3 lol?
@Anonymous Majboor Idk exactly your code yet, but my guess is to first switch your +/- signs 🙂 (edited)
Avatar
Anonymous 30-Jul-20 11:04 PM
@Anonymous
Avatar
Anonymous 30-Jul-20 11:06 PM
@Anonymous what's the line for energy inside the function get_energy for u? it should be the same for everyone, but just to check
Avatar
Anonymous 30-Jul-20 11:06 PM
np.outer creates the outer product of flattened vectors. Did you get the required form as well?
@Anonymous (-1.0523732)1 + (0.39793742)iz + (-0.3979374)zi + (-0.0112801)zz + (0.18093119)*xx
👍 1
Avatar
Anonymous 30-Jul-20 11:08 PM
np.outer creates the outer product of flattened vectors. Did you get the required form as well?
@Anonymous i do NOT (edited)
Avatar
Anonymous 30-Jul-20 11:09 PM
@Anonymous ok. You seem to be having lower orders of magnitude in the eigenvalues. Have you rescaled the energy by some means?
Avatar
Anonymous 30-Jul-20 11:10 PM
i did not... i only diagonalized and picked the least one
Avatar
Anonymous 30-Jul-20 11:10 PM
@Anonymous Bernier hey were you able to do computing gradients section
@Anonymous Done with gradients section
Avatar
Anonymous 30-Jul-20 11:10 PM
no, the signs are correct, i am very confused
Avatar
Anonymous 30-Jul-20 11:11 PM
no, the signs are correct, i am very confused
@Anonymous Majboor Switch them, trust me XD
also wait
switch angle 1 and angle 2, but idk if that matters
Avatar
Anonymous 30-Jul-20 11:12 PM
@Anonymous hmm this is inordinately strange. Could you send your net hamiltonian matrix
Avatar
Anonymous 30-Jul-20 11:13 PM
no, the signs are correct, i am very confused
@Anonymous Majboor
Avatar
Anonymous 30-Jul-20 11:14 PM
oh i had the angles switched🤦
Avatar
Anonymous 30-Jul-20 11:14 PM
@Anonymous hmm this is inordinately strange. Could you send your net hamiltonian matrix
@Anonymous
[[-1.06365328 0. 0. -1.83696792] [ 0. 0.18093119 0.18093119 0. ] [ 0. 0.18093119 0.18093119 0. ] [-0.24521828 0. 0. -1.06365332]]
Avatar
Anonymous 30-Jul-20 11:16 PM
@Anonymous
Avatar
Anonymous 30-Jul-20 11:17 PM
@Anonymous DM'd u
Avatar
Anonymous 30-Jul-20 11:19 PM
@Anonymous ?
Avatar
Anonymous 30-Jul-20 11:19 PM
i messaged u personally, and shared my code with u there...
Avatar
Anonymous 30-Jul-20 11:19 PM
@Anonymous ok
Avatar
Anonymous 30-Jul-20 11:20 PM
yay
🎉 1
Avatar
Anonymous 30-Jul-20 11:20 PM
@Anonymous if u are on a browser, u should see the home button in the top-left corner of the screen (edited)
👍 1
Avatar
Anonymous 30-Jul-20 11:28 PM
Hello All, Welcome to #Cryptography August #KnowledgeSeries event hosted by Quantum Computing India https://www.youtube.com/watch?v=x_TrF39lrr4 This month we are dedicating all our weekly event around Quantum Cryptography. 1) Aug 01: Cryptography 101 2) Aug 08: Cryptography Implementation in Classical Computing 3) Aug 15: Secure Quantum Computation 4) Aug 22: Quantum Key distribution 5) Aug 29: #HackSeries 2.0 use case and Team Formation RSVP Here >>> https://quantumcomputingindia.com/cryptography-august Agenda for Cryptography 101: 1) History 2) Need 3) Types of #Cryptography 4) DSA, RSA, Elliptic Curve, Diffie Hellman, Key Serialization, etc. 5) Applications 6) Limitations ( A Debate) Sessions led by: 1. Karthiganesh Durai (KG) - Data Scientist / Quantum Machine Learning 2. Aalo Majumdar - Masters Student IISc. - Post Quantum Cryptography Meetup- https://www.meetup.com/Quantum-Computing-India/events/272245707/
Hello All, Welcome to #Cryptography August #KnowledgeSeries event hosted by Quantum Computing India This month we are dedicating all our weekly event around Quantum Cryptography. 1) Aug 01: Cryptography 101 2) Aug 08: Cryptography Implementation in Classical Computing 3) Aug...
QCI's #CryptographyAugust 5 Saturdays. 5 Topics. 5 Academics & Practitioners. 1 Hackathon.
Sat, Aug 1, 2020, 4:00 PM: Hello All,Welcome to #Cryptography August #KnowledgeSeries event hosted by Quantum Computing IndiaThis month we are dedicating all our weekly event around Quantum Cryptograp
SuperimposedSmileWhite 1
Avatar
Anonymous 30-Jul-20 11:35 PM
Finally.... Then back to lab 8 😁
Avatar
Anonymous 31-Jul-20 12:39 AM
Can someone please guide me how to code the measure_xx_circuit function of Lab9?
Avatar
Anonymous 31-Jul-20 12:40 AM
Can someone please guide me how to code the measure_xx_circuit function of Lab9?
@Anonymous Yep, do you have any questions about it?
Avatar
Anonymous 31-Jul-20 12:41 AM
Not specifically, I'm confused totally😩
@Anonymous
Avatar
Anonymous 31-Jul-20 12:42 AM
Ahhh ok, do you see how measurezz was done?
Avatar
Anonymous 31-Jul-20 12:42 AM
Yes
Avatar
Anonymous 31-Jul-20 12:42 AM
okay, we're gonna start from there 🙂
copy that line that contains measure_all()
paste that into measure_xx_circuit
Avatar
Anonymous 31-Jul-20 12:43 AM
Okay
Avatar
Anonymous 31-Jul-20 12:43 AM
all we need to do is add one more line
and i'll explain why
Avatar
Anonymous 31-Jul-20 12:43 AM
Yes please
Avatar
Anonymous 31-Jul-20 12:44 AM
so in the previous circuit we did <Z> = <psi|Z|psi>
Avatar
Anonymous 31-Jul-20 12:44 AM
Yes
Avatar
Anonymous 31-Jul-20 12:44 AM
<Z> is expectation value
We actually want to get the expectation value of X in Z form
or write X in terms of Z
So you can actually rewrite X gate in another way 🙂 (edited)
Avatar
Anonymous 31-Jul-20 12:45 AM
I see
Avatar
Anonymous 31-Jul-20 12:46 AM
X = HZH
you can actually prove this using matrix multiplication 🙂
does that make sense so far?
Avatar
Anonymous 31-Jul-20 12:46 AM
Yes it does
Avatar
Anonymous 31-Jul-20 12:46 AM
ok so now
<X> = <psi|X|psi> = <psi|HZH|psi>
Avatar
Anonymous 31-Jul-20 12:47 AM
Yes
Avatar
Anonymous 31-Jul-20 12:47 AM
this results in <psi H|Z|H psi>
So now, what gate can you apply to your circuit? (edited)
that will give you <X>? (edited)
Avatar
Anonymous 31-Jul-20 12:50 AM
H
Avatar
Anonymous 31-Jul-20 12:50 AM
yes, there you go 🙂
Avatar
Anonymous 31-Jul-20 12:50 AM
Then?
Avatar
Anonymous 31-Jul-20 12:51 AM
So before you call measure_all()
add in the line that will put the hadamard gates for both qubits 🙂
👍 2
after that
you have ex1 all done 😄
Avatar
Anonymous 31-Jul-20 12:52 AM
I see. So it was this easy. Many thanks @Anonymous
Avatar
Anonymous 31-Jul-20 12:52 AM
I see. So it was this easy. Many thanks @Anonymous
@Anonymous No problem 🙂
👍 1
Avatar
Anonymous 31-Jul-20 01:05 AM
Lab 9 Bonus 2: which solution is better?
SPOILER
import numpy as np from qiskit.quantum_info.operators import Operator, Pauli h = [[-1.0523732, Pauli(label='II')], [0.39793742, Pauli(label='IZ')], [-0.3979374, Pauli(label='ZI')], [-0.0112801, Pauli(label='ZZ')], [0.18093119, Pauli(label='XX')] ] H_m = [] for hi in h: H_m.append(hi[0]*Operator(hi[1])) np.linalg.eigvalsh((H_m[0]+H_m[1]+H_m[2]+H_m[3]+H_m[4]).data)
(edited)
👍 3
A different approach:
SPOILER
from qiskit.aqua.algorithms import NumPyEigensolver from qiskit.aqua.operators import WeightedPauliOperator H = WeightedPauliOperator(h) print(H.print_details()) ee = NumPyEigensolver(H) result = ee.run() ref = result['eigenvalues'] print(ref)
(edited)
😍 3
🤯 1
Avatar
Anonymous 31-Jul-20 01:13 AM
answer for bonus 2 is -1.8 right
Avatar
Anonymous 31-Jul-20 01:21 AM
guys check this paper for quantum chemistry simulations
it reviews everything in the lecture in a short and simple manner longer review papers have already been suggested i think
Avatar
Anonymous 31-Jul-20 01:46 AM
Does anyone know how to calculate computational complexity of a quantum circuit ? For example what is the computational complexity of a CNOT, or CZ-gate etc. ? Any reference please. @Anonymous
Avatar
Anonymous 31-Jul-20 01:50 AM
@Anonymous Do you mean the asymptotic complexity of a quantum algorithm or the complexity of simulating a quantum circuit on classical hardware? (edited)
For the former, there are several different measurements of a circuit’s complexity, including depth, width, and T gate count. For the latter, there are various approaches and compilation/optimization methods, but generally speaking, a circuit with more entanglement is harder to simulate. (edited)
Avatar
Anonymous 31-Jul-20 01:55 AM
There are no grading options for lab 7 right ??
Avatar
Anonymous 31-Jul-20 01:56 AM
There are no grading options for lab 7 right ??
@Anonymous nope, it's a freebie :)
Avatar
Anonymous 31-Jul-20 02:07 AM
@Anonymous , I want to know about asymptotic computational complexity for a quantum circuit. What I know there can be two kinds of asymptotic complexity , asymptotic time complexity and asymptotic space complexity . (edited)
Avatar
Anonymous 31-Jul-20 02:08 AM
Quantum computational complexity is similar to classical computational complexity
Re. different measurements of complexity, it’s probably similar to the time/space complexity tradeoffs in classical computing
Avatar
Anonymous 31-Jul-20 02:13 AM
@Anonymous Thanks 🙂 (edited)
Avatar
Anonymous 31-Jul-20 02:15 AM
Finally did lab 8 😴
🙂 2
Avatar
Anonymous 31-Jul-20 02:48 AM
Lab 7 and Lab 8 are ungraded right?
Avatar
Anonymous 31-Jul-20 02:48 AM
Lab 7 and Lab 8 are ungraded right?
@Anonymous Fitter yes they're ungraded, everyone gets points (edited)
Avatar
Anonymous 31-Jul-20 03:01 AM
Finally did lab 8 😴
@Anonymous Fonseca pauli_symm is the same that we get by doing: pauli_symm = Z2Symmetries.find_Z2_symmetries(qubitOp_t) ?
Avatar
Anonymous 31-Jul-20 03:03 AM
How to credit these bonus points in addition to grading ?
Avatar
Anonymous 31-Jul-20 03:03 AM
How to credit these bonus points in addition to grading ?
@Anonymous they're ungraded
Avatar
Anonymous 31-Jul-20 03:04 AM
solution for bonus 1?
Avatar
Anonymous 31-Jul-20 03:05 AM
solution for bonus 1?
@Anonymous solutions will be posted tomorrow :)
Avatar
Anonymous 31-Jul-20 03:05 AM
ok 🙂
Avatar
Anonymous 31-Jul-20 03:07 AM
@Anonymous they're ungraded
@Anonymous ok
Avatar
Anonymous 31-Jul-20 03:13 AM
solution for bonus 1?
@Anonymous Just change the number of shots to 100,1000 and 10k, that is the solution for 1st bonus
👍 1
Avatar
Anonymous 31-Jul-20 03:14 AM
@Anonymous Just change the number of shots to 100,1000 and 10k, that is the solution for 1st bonus
@Anonymous yep, take the last two lines of code from the previous cell and change the number of shots :)
💯 1
Avatar
Anonymous 31-Jul-20 03:21 AM
I ran a second time the grading cell by mistake, no other messages than “correct”. Will this cause problem for grading?
Avatar
Anonymous 31-Jul-20 03:22 AM
I ran a second time the grading cell by mistake, no other messages than “correct”. Will this cause problem for grading?
@Anonymous nope, no problem at all :)
Avatar
Anonymous 31-Jul-20 03:23 AM
@Anonymous nope, no problem at all :)
@Anonymous Ok, 👍
Avatar
Anonymous 31-Jul-20 03:41 AM
oh thats strange i was able to you could always try scihub
oh and this is a website for more details about second quantization http://www.phys.lsu.edu/~jarrell/COURSES/ADV_SOLID_HTML/Other_online_texts/
Avatar
Anonymous 31-Jul-20 05:44 AM
Will this cause any problem with the grading??
Avatar
Anonymous 31-Jul-20 05:47 AM
no
Avatar
Anonymous 31-Jul-20 05:56 AM
Okie thanks 🙂
Avatar
Anonymous 31-Jul-20 06:05 AM
Guys can you confirm am i missing anything to consider having completed lab work?
Avatar
Anonymous 31-Jul-20 06:11 AM
where is 7?
Avatar
Anonymous 31-Jul-20 06:13 AM
where is 7?
@Anonymous isn't 7 is ungraded?
Avatar
Anonymous 31-Jul-20 06:15 AM
7 and 8 are freebies @Anonymous @Anonymous
👆 1
Avatar
Anonymous 31-Jul-20 06:15 AM
there was no grading cell in 7
Avatar
Anonymous 31-Jul-20 06:16 AM
there weren't in either 7 or 8 @Anonymous
Avatar
Anonymous 31-Jul-20 06:16 AM
yeah
Avatar
Anonymous 31-Jul-20 06:16 AM
your scores look like mine
I guess we should be good 🙂
Avatar
Anonymous 31-Jul-20 06:16 AM
i hope so
that's why wanted to confirm
Avatar
Anonymous 31-Jul-20 06:17 AM
Avatar
Anonymous 31-Jul-20 06:17 AM
where is the grading cell in 7?
Avatar
Anonymous 31-Jul-20 06:18 AM
Hey, my lab5 is taking an unsually long time to grade
Any ideas on it?
Avatar
Anonymous 31-Jul-20 06:19 AM
did you ran any cell multiple times? (edited)
Avatar
Anonymous 31-Jul-20 06:20 AM
@Anonymous I did 7 but there is no grading cell!!
Avatar
Anonymous 31-Jul-20 06:20 AM
Yeah
where did you find grading cell of lab 7? @Anonymous
Avatar
Anonymous 31-Jul-20 06:21 AM
and according to Qiskit team. 7 and 8 are freebies
Avatar
Anonymous 31-Jul-20 06:22 AM
did you ran any cell multiple times?
@Anonymous I dont think so, all the cells until the grading cell is fine
After running the grading cell, it shows grading...
It's more than around half an hour that way
Avatar
Anonymous 31-Jul-20 06:25 AM
I just re-ran 7...no grading!!
Avatar
Anonymous 31-Jul-20 06:26 AM
I suggest you can try reunzipping the original lab 5 file and delete the present one
Avatar
Anonymous 31-Jul-20 06:26 AM
I suggest you can try reunzipping the original lab 5 file and delete the present one
@Anonymous Did that too
Avatar
Anonymous 31-Jul-20 06:26 AM
might work this time
Avatar
Anonymous 31-Jul-20 06:27 AM
might work this time
@Anonymous I'll try once more
Avatar
Anonymous 31-Jul-20 06:28 AM
@Anonymous what am I missing on lab 7? I couldn't find a grading cell
Avatar
Anonymous 31-Jul-20 06:29 AM
@Anonymous it would be great if you could share the screen shot of grade cell in lab 7
Avatar
Anonymous 31-Jul-20 06:30 AM
@Anonymous what am I missing on lab 7? I couldn't find a grading cell
@Anonymous lab 7 and 8 are not to be graded. you get free credit for them
Avatar
Anonymous 31-Jul-20 06:30 AM
that's what I thought @Anonymous
Avatar
Anonymous 31-Jul-20 06:30 AM
@Anonymous there is no grading cell for lab 7, the last cell is just to share your code with the Qiskit team and is optional
Avatar
Anonymous 31-Jul-20 06:31 AM
@Anonymous thank you..I just got really confused...so your grading doesn't show anything for lab 7, right?
Avatar
Anonymous 31-Jul-20 06:32 AM
I’m not at my computer to check, but you can check
Avatar
Anonymous 31-Jul-20 06:35 AM
Thank you @Anonymous
👍 1
Avatar
Anonymous 31-Jul-20 06:36 AM
It shouldn’t matter whether or not the system says you got lab 7 or 8 correct since everyone gets credit for them officially
Avatar
Anonymous 31-Jul-20 06:37 AM
yah, I guess...I feel calm again LOL
does anyone have the link to the youtube live event today?
Avatar
Anonymous 31-Jul-20 06:39 AM
yah, I guess...I feel calm again LOL
@Anonymous ha ha
Avatar
Anonymous 31-Jul-20 06:40 AM
Your formal invite to weekly Qiskit videos ► https://qisk.it/sub Our panelists will discuss their journeys and how you can take advantage of your own interdisciplinary skills and perspectives to secure a job in quantum computing and build your career. The panel will include q...
Avatar
Anonymous 31-Jul-20 06:42 AM
thanks again @Anonymous
👍 1
Avatar
Anonymous 31-Jul-20 06:45 AM
@Anonymous Did that too
@Anonymous Hey, this worked! Thanks
Avatar
Anonymous 31-Jul-20 07:19 AM
does anyone know where we are supposed to ask questions for the Careers in QC panel?
Avatar
Anonymous 31-Jul-20 07:57 AM
I am a bit confused. I did just 2 exercises (filled 2 blocks) in lab 9 and I see that I completed correctly ex1, ex2 and ex3. Are the bonus considered as ex2 and ex3 and considered correct in any case? (edited)
Avatar
Anonymous 31-Jul-20 08:22 AM
the bonus questions are separate (add-on) but not graded @Anonymous
Avatar
Anonymous 31-Jul-20 08:28 AM
Hello, I'm having a hard time trying to understand superconducting qubits. It would be helpful if someone can provide me with additional material to go through that topic
Avatar
Anonymous 31-Jul-20 08:30 AM
The aim of this review is to provide quantum engineers with an introductory guide to the central concepts and challenges in the rapidly accelerating field of superconducting quantum circuits. Over...
Avatar
Anonymous 31-Jul-20 08:30 AM
Thank you @Anonymous Preis
today's last date after all
@Anonymous Is today the last day to submit labs? Wasn't it mentioned in lecture 7 that it has been extended till sunday?
Avatar
Anonymous 31-Jul-20 08:32 AM
yes, until sunday!
Avatar
Anonymous 31-Jul-20 08:46 AM
I am having this error when I am trying to send my notebook in exercise 9, do you know how to solve it?😕
Avatar
Anonymous 31-Jul-20 09:03 AM
@Anonymous Open grade.py file....go to line 225....after 'r'...add coma and type....encoding="utf-8" .....save it and re run the cell
Avatar
Anonymous 31-Jul-20 09:13 AM
@Anonymous Is today the last day to submit labs? Wasn't it mentioned in lecture 7 that it has been extended till sunday?
@Anonymous Oh yeah, its been extended
Avatar
Anonymous 31-Jul-20 09:26 AM
Mission accomplished: Grading... lab9/ex1 - 🎉 Correct 🎊 Hurray! You have a new correct answer! Let's submit it. Submitting the answers for lab9... 📝 Our records, so far, are: Correct answers: lab1:ex1, lab2:ex1, lab3:ex1, lab4:ex1, lab5:ex1, lab6:ex1a, lab6:ex1b, lab9:ex1, lab9:ex2, lab9:ex3 Grading... lab9/ex2 - 🎉 Correct Grading... lab9/ex3 - 🎉 Correct Thanks @Anonymous for your hints about lab9:ex1
Avatar
Anonymous 31-Jul-20 09:40 AM
When do we get certificates ?
Avatar
Anonymous 31-Jul-20 10:24 AM
Mission accomplished: Grading... lab9/ex1 - 🎉 Correct 🎊 Hurray! You have a new correct answer! Let's submit it. Submitting the answers for lab9... 📝 Our records, so far, are: Correct answers: lab1:ex1, lab2:ex1, lab3:ex1, lab4:ex1, lab5:ex1, lab6:ex1a, lab6:ex1b, lab9:ex1, lab9:ex2, lab9:ex3 Grading... lab9/ex2 - 🎉 Correct Grading... lab9/ex3 - 🎉 Correct
>
Thanks @Anonymous for your hints about lab9:ex1
@Anonymous Geraldo Machado no problem :)
Avatar
Anonymous 31-Jul-20 10:26 AM
I was trying to download pyscf for lab 8 however i am getting the following error ERROR: Command errored out with exit status 1: python setup.py egg_info
does anyone know the solution to his
this is happending when I use pip intall pyscf
Avatar
Anonymous 31-Jul-20 10:31 AM
I was trying to download pyscf for lab 8 however i am getting the following error ERROR: Command errored out with exit status 1: python setup.py egg_info
@Anonymous hey are you on windows?
Avatar
Anonymous 31-Jul-20 10:39 AM
yes
Avatar
Anonymous 31-Jul-20 10:40 AM
PySCF isn't compatible with Windows
But if you do have WSL, there are instructions for that as well 🙂
Avatar
Anonymous 31-Jul-20 10:41 AM
I see that is so unfortunate but thanks a lot!
what is WSL?
Avatar
Anonymous 31-Jul-20 10:41 AM
Windows Subsystem for Linux 🙂
Avatar
Anonymous 31-Jul-20 10:41 AM
Windows subsystem for linux
Try it on ibmq or colab, that path is easier I guess
Avatar
Anonymous 31-Jul-20 10:43 AM
what are the instructions for WSL though?
Avatar
Anonymous 31-Jul-20 10:44 AM
what are the instructions for WSL though?
@Anonymous @Anonymous can help on how to set up wsl
Avatar
Anonymous 31-Jul-20 10:44 AM
Avatar
Anonymous 31-Jul-20 10:45 AM
if that dosen't helps
Python is a flexible and versatile programming language, with strengths in scripting, automation, data analysis, machine learning, and back-end development. This quickstart tutorial will walk you through installing Python and setting up a programming
follow this
then in the same env go pip install jupyter and other stuff
Avatar
Anonymous 31-Jul-20 10:46 AM
I see @Anonymous and @Anonymous thank you!!
btw its not even compatible if I use conda on windows? cause I see that on WSL you have used a virtual environment
Avatar
Anonymous 31-Jul-20 10:47 AM
btw its not even compatible if I use conda on windows? cause I see that on WSL you have used a virtual environment
@Anonymous nope, even conda on windows gave errors 😦
Avatar
Anonymous 31-Jul-20 10:47 AM
ya
Avatar
Anonymous 31-Jul-20 10:47 AM
btw its not even compatible if I use conda on windows? cause I see that on WSL you have used a virtual environment
@Anonymous you can also try virtual box on Windows for ubuntu or any Linux
Avatar
Anonymous 31-Jul-20 10:48 AM
no no virtual box is too heavy for normal pc (edited)
Avatar
Anonymous 31-Jul-20 10:48 AM
I see Anyway thakns I shall try it online then
Avatar
Anonymous 31-Jul-20 10:48 AM
no no virtual box is too heavy for normal pc
@Anonymous Yeah it is, the best way I guess is ibmq or colab
Avatar
Anonymous 31-Jul-20 10:49 AM
no no virtual box is too heavy for normal pc
@Anonymous yeah, VM VirtualBox is slow on my computer, even if i extend memory 😦
Also took a while for me to install a while back 😦
Avatar
Anonymous 31-Jul-20 10:50 AM
@Anonymous yeah, VM VirtualBox is slow on my computer, even if i extend memory 😦
@Anonymous just giving option 😅, I still advice on ibmq or colab
Avatar
Anonymous 31-Jul-20 10:50 AM
@Anonymous just giving option 😅, I still advice on ibmq or colab
@Anonymous oh trueeee, i guess in the long run, if you're pursuing CS, some way to have linux is helpful 😄
Avatar
Anonymous 31-Jul-20 10:51 AM
ya its better to use a potable linux or make a dual boot
👍 1
Avatar
Anonymous 31-Jul-20 10:52 AM
@Anonymous oh trueeee, i guess in the long run, if you're pursuing CS, some way to have linux is helpful 😄
@Anonymous many people in coding background use dual boot if they buy Windows, and I also prefer Linux/macos over Windows anyday
Avatar
Anonymous 31-Jul-20 10:52 AM
@Anonymous many people in coding background use dual boot if they buy Windows, and I also prefer Linux/macos over Windows anyday
@Anonymous Yes, I have a dual boot, as well 🙂
@Anonymous many people in coding background use dual boot if they buy Windows, and I also prefer Linux/macos over Windows anyday
@Anonymous And oh yeah, definitely XD
Avatar
Anonymous 31-Jul-20 10:56 AM
@Anonymous oh trueeee, i guess in the long run, if you're pursuing CS, some way to have linux is helpful 😄
@Anonymous People keep telling me this but I never found any problem with windows until today :/
Avatar
Anonymous 31-Jul-20 11:00 AM
@Anonymous People keep telling me this but I never found any problem with windows until today :/
@Anonymous Dual boot is helpful in the long run for Windows laptop if you are juggling with many virtual environments and python stuff, Linux or macos gives more flexibility than Windows in these aspects, but again, os is a matter of choice😅
👍 1
Avatar
Anonymous 31-Jul-20 11:05 AM
how to make lab9 cell 1
Avatar
Anonymous 31-Jul-20 11:06 AM
how to make lab9 cell 1
@Anonymous Hey, what do you have so far for lab 9 exercise 1?
Avatar
Anonymous 31-Jul-20 11:07 AM
yup
the Code ask you to take a of XX
and we learned in the lecture that we can do it using
Avatar
Anonymous 31-Jul-20 11:08 AM
yes XX VALUE
Avatar
Anonymous 31-Jul-20 11:08 AM
HZH
as HZH = X
we want the masurment of <psi|X|psi> but in Z basis
so we can do it using this identity
X = HZH
put it there in the expectation value
we get
<psi|HZH|psi>
goes to <psi.H|Z|H.psi>
from here we can say that we are taking expectation of Z wrt state |H.psi>
we know that to get the expectation of Z we just need to take measurment
so to get this <psi.H|Z|H.psi> we h=just need to take measurment of |H.psi>
and we can make that just by putting a H gate at the end on the qubit we want to measure X in
Avatar
Anonymous 31-Jul-20 11:14 AM
OK THANX
I will try
Avatar
Anonymous 31-Jul-20 11:20 AM
What do you think about the applications of Quantum Computing in game development? My goal is to use Quantum Computing in this more abstract way.
Avatar
Anonymous 31-Jul-20 11:21 AM
i did a self project on the same
wanna see
can't say its a good project though
Avatar
Anonymous 31-Jul-20 11:23 AM
anyone have a link to the next video/discussion that was mentioned towards the end of the career panel?
Avatar
Anonymous 31-Jul-20 11:23 AM
Your formal invite to weekly Qiskit videos ► https://qisk.it/sub Speaker: Charlie Bennett Host: Zlatko Minev, Ph.D. Title: Information is Quantum: How physics helped explain the nature of information and what can be done with it -- The Quantum Computing Seminar Series is a...
Avatar
Anonymous 31-Jul-20 11:23 AM
Thanks!!!
Avatar
Anonymous 31-Jul-20 11:24 AM
I think games have great potential for introducing people to quantum computing and teaching them the basics. I’d love to see more high-quality quantum games out there.
Avatar
Anonymous 31-Jul-20 11:25 AM
wanna see
@Anonymous would love to (edited)
to
Avatar
Anonymous 31-Jul-20 11:27 AM
Quantum calculation for multiplayer damage based games - CodieKev/Quantum_Games-Damage-based-multiplayer-games-
👍 1
its not a game, its just a backend calculation using quantum processor
it's my first project. I started learning QC with this
Avatar
Anonymous 31-Jul-20 11:30 AM
from what ive learned from this course, the applications of qc in game dev are going to be (in the beggining at least) very subtle
and im assuming you use aqua?
Avatar
Anonymous 31-Jul-20 11:31 AM
@Anonymous did you know about quantum chess
Avatar
Anonymous 31-Jul-20 11:34 AM
no
why
i have seen some that chess pieces are in superpositon state but they run on classical processor
Avatar
Anonymous 31-Jul-20 11:35 AM
once i have seen a video stephen hawking and paul rudd playing that game
Avatar
Anonymous 31-Jul-20 11:35 AM
no lab for today ?
Avatar
Anonymous 31-Jul-20 11:36 AM
i don't know how they processed it
Avatar
Anonymous 31-Jul-20 11:36 AM
school over, still u want lab
Avatar
Anonymous 31-Jul-20 11:36 AM
no lab for today ?
@Anonymous ya we have a lab. You have to take interview of fokes and give them career advice (edited)
😆 2
Avatar
Anonymous 31-Jul-20 11:37 AM
@Anonymous career advice?
Avatar
Anonymous 31-Jul-20 11:37 AM
lab-philic
Avatar
Anonymous 31-Jul-20 11:37 AM
@Anonymous career advice?
@Anonymous SATYA SAI sorry it was a typo
Last day of summer school guys
Avatar
Anonymous 31-Jul-20 11:39 AM
ok @Anonymous , interview for u.... how did u start your QC journey?
Avatar
Anonymous 31-Jul-20 11:41 AM
ok @Anonymous , interview for u.... how did u start your QC journey?
@Anonymous i stayed in the hostel during my college winter break last year and there was nothing to do
i saw one of my friend working with the quantum circuit so i asked him to teach me
thats how i met QC
what about you @Anonymous
Avatar
Anonymous 31-Jul-20 11:42 AM
ohh great, so, which resources u started from? any youtube channel..
Avatar
Anonymous 31-Jul-20 11:42 AM
@Anonymous ya we have a lab. You have to take interview of fokes and give them career advice
@Anonymous oh, where are the exact instructions for the lab?
Avatar
Anonymous 31-Jul-20 11:42 AM
ohh great, so, which resources u started from? any youtube channel..
@Anonymous ya Abe video series then qiskit notebook
Avatar
Anonymous 31-Jul-20 11:42 AM
@Anonymous i am new in this field, i saw ABE's video series and found it interesting
Avatar
Anonymous 31-Jul-20 11:43 AM
@Anonymous i am new in this field, i saw ABE's video series and found it interesting
@Anonymous when did you start playing with QC
Avatar
Anonymous 31-Jul-20 11:44 AM
@Anonymous i started this summer, during the lockdown period as i had to work from home
so, you are basically a physics student ?
Avatar
Anonymous 31-Jul-20 11:45 AM
@Anonymous oh, where are the exact instructions for the lab?
@Anonymous Majboor actually that was supposed to be a secret as they are calling only one person at a time, and no other member know who has been to the lab in order to avoid cheating (edited)
so, you are basically a physics student ?
@Anonymous yup
Avatar
Anonymous 31-Jul-20 11:46 AM
hmm?
Avatar
Anonymous 31-Jul-20 11:46 AM
thats great, i find you having some in depth knowledge in this field
Avatar
Anonymous 31-Jul-20 11:46 AM
they will call us?
Avatar
Anonymous 31-Jul-20 11:46 AM
@Anonymous Majboor yes be ready....
Avatar
Anonymous 31-Jul-20 11:47 AM
they will call us?
@Anonymous Majboor yup just wait
Avatar
Anonymous 31-Jul-20 11:47 AM
ok, with microphone and webcam. and they will interview us and give us career advice? nice.
Avatar
Anonymous 31-Jul-20 11:48 AM
no mate you got it all wrong
Avatar
Anonymous 31-Jul-20 11:48 AM
yes personal session 😆
Avatar
Anonymous 31-Jul-20 11:49 AM
you will have to take an interview and give career advice to a hypothetical character
Avatar
Anonymous 31-Jul-20 11:49 AM
ahhh ok. i see.
Avatar
Anonymous 31-Jul-20 11:49 AM
the lecture was about career advice
so you should be able to guide other people
Avatar
Anonymous 31-Jul-20 11:50 AM
👍
Avatar
Anonymous 31-Jul-20 11:51 AM
Disclaimer: Everything i have been saying about today's lab is nothing but a big fat joke. Don't take it seriously
Avatar
Anonymous 31-Jul-20 11:51 AM
lol. very long joke then.
Avatar
Anonymous 31-Jul-20 11:52 AM
well people dont often take me seriously but its better to be on the safe side
guys lets thank the mentors as this is the last day of QGSS and they were there for us all day long. (edited)
💯 2
are you guys here
Avatar
Anonymous 31-Jul-20 11:53 AM
Thank you @Anonymous
💯 4
Avatar
Anonymous 31-Jul-20 11:53 AM
Thank you @Anonymous
💯 5
anyone online please keep this going
Avatar
Anonymous 31-Jul-20 11:54 AM
Thank you @Anonymous
👍 4
Avatar
Anonymous 31-Jul-20 11:54 AM
Thank you @Anonymous
qiskitwhite 4
Avatar
Anonymous 31-Jul-20 11:56 AM
Thank you guys! This summer school wouldn't be so great without all of your participations!
👍 10
Avatar
Anonymous 31-Jul-20 11:57 AM
thank you! @Anonymous
Avatar
Anonymous 31-Jul-20 12:02 PM
Hey guys, is there anywhere to confirm that you earned your certificate? I did enough labs but with the grading issues I was just wondering if there was a place to confirm you've gotten yours
Avatar
Anonymous 31-Jul-20 12:02 PM
Thank you @Anonymous ♡
Avatar
Anonymous 31-Jul-20 12:02 PM
And of course, thanks @Anonymous !!
Avatar
Anonymous 31-Jul-20 12:03 PM
Thank you @Anonymous
Avatar
Anonymous 31-Jul-20 12:03 PM
Thank you @Anonymous
Avatar
Anonymous 31-Jul-20 12:05 PM
Thank you @Anonymous
Avatar
Anonymous 31-Jul-20 12:05 PM
@Anonymous Thank you!
Avatar
Anonymous 31-Jul-20 12:06 PM
@Anonymous Thank you!
Avatar
Anonymous 31-Jul-20 12:17 PM
Thank you @Anonymous
Avatar
Anonymous 31-Jul-20 12:17 PM
@Anonymous Thank you!
Avatar
Anonymous 31-Jul-20 12:24 PM
Thankyou@Anonymous
Avatar
Anonymous 31-Jul-20 12:28 PM
Thank you @Anonymous
Avatar
Anonymous 31-Jul-20 12:30 PM
Thank You all ! Hoping that we may cross our paths in future and meet in-person !! Would like to stay connected with you all !!
Cool that we got a #networking channel !!
Avatar
Anonymous 31-Jul-20 12:40 PM
Thank you @Anonymous
Avatar
Anonymous 31-Jul-20 12:47 PM
Thanks a lot @Anonymous 🐣
Avatar
Anonymous 31-Jul-20 12:48 PM
Thanks a lot @Anonymous
Avatar
Anonymous 31-Jul-20 12:49 PM
Thank you ❤️ @Anonymous
Avatar
Anonymous 31-Jul-20 12:53 PM
Thank you @Anonymous
Avatar
Anonymous 31-Jul-20 12:53 PM
Thankyou @Anonymous
Avatar
Anonymous 31-Jul-20 12:55 PM
Thank you @Anonymous and @Anonymous 🙂
Avatar
Anonymous 31-Jul-20 12:57 PM
Thank you ❤ @Anonymous
Avatar
Anonymous 31-Jul-20 12:57 PM
Thankyou @Anonymous
Avatar
Anonymous 31-Jul-20 01:01 PM
It was an amazing experience....Thank you @Anonymous see you soon...🙂
Avatar
Anonymous 31-Jul-20 01:06 PM
Thank you @Anonymous
Avatar
Anonymous 31-Jul-20 01:06 PM
Thanks @Anonymous
Avatar
Anonymous 31-Jul-20 01:09 PM
Thank you so much @Anonymous
Avatar
Anonymous 31-Jul-20 01:09 PM
Thanks @Anonymous !
Avatar
Anonymous 31-Jul-20 01:12 PM
Thanks everyone for the help and especially @Anonymous !
Avatar
Anonymous 31-Jul-20 01:24 PM
Bye people, was nice learning and puzzling with you all. had a lot of fun. @Anonymous Huang I'm sure we'll meet again 😉 . Thanks @Anonymous
Avatar
Anonymous 31-Jul-20 01:31 PM
Thanks a lot @Anonymous with special thanks to @Anonymous , You're so amazing.
Avatar
Anonymous 31-Jul-20 01:49 PM
Thanks a lot @Anonymous ...you guys were simply brilliant
Avatar
Anonymous 31-Jul-20 01:53 PM
Only labs 1,2,3,4,5,6,9 were graded homeworks right? Is there anything apart from those that we need to submit?
Avatar
Anonymous 31-Jul-20 01:53 PM
Only labs 1,2,3,4,5,6,9 were graded homeworks right? Is there anything apart from those that we need to submit?
@Anonymous Fitter nope, nothing else :)
Avatar
Anonymous 31-Jul-20 01:53 PM
Also, how do I check my records? As in what all I have submitted?
And my grades?
Avatar
Anonymous 31-Jul-20 01:55 PM
Also, how do I check my records? As in what all I have submitted?
@Anonymous Fitter if you have this, you got a 100 😄
It's out of 9
And you get 2 points for free 🙂
Avatar
Anonymous 31-Jul-20 01:55 PM
Yea but how do I get that?
Avatar
Anonymous 31-Jul-20 01:55 PM
The grading cells 🙂
If you only see this for example
delete answers.enc in your grading_tools folder, and rerun 🙂
Then you'll see what I have above 🙂
Avatar
Anonymous 31-Jul-20 01:58 PM
Oh okie thanks 🙂
Avatar
Anonymous 31-Jul-20 01:58 PM
Oh okie thanks 🙂
@Anonymous Fitter No problem 😄
Avatar
Anonymous 31-Jul-20 02:51 PM
Does anyone know if there is some sort of permanent Discord / Forum to discuss Qiskit or QC? qiskitwhite
Avatar
Anonymous 31-Jul-20 02:57 PM
SPOILER || ```python from qiskit.aqua.algorithms import NumPyEigensolver from qiskit.aqua.operators import WeightedPauliOperator
>
H = WeightedPauliOperator(h) print(H.print_details())
>
ee = NumPyEigensolver(H)
>
result = ee.run() ref = result['eigenvalues'] print(ref) ``` ||
@Anonymous I get what you want to do. It's an elegant solution
Avatar
Anonymous 31-Jul-20 03:02 PM
Can anyone give me a more of less slight idea about how to simulate the H2 molecule using the 2 qubits? You can DM me. Its kinda confusing. You can also show me the code instead
Avatar
Anonymous 31-Jul-20 03:05 PM
@Anonymous I have a question. Why aren't you including the nuclear repulsion energy and the energy shift? In your solution of the bonus 2
Can anyone give me a more of less slight idea about how to simulate the H2 molecule using the 2 qubits? You can DM me. Its kinda confusing. You can also show me the code instead
@Anonymous What do you want to know?
Avatar
Anonymous 31-Jul-20 03:10 PM
@Anonymous I have a question. Why aren't you including the nuclear repulsion energy and the energy shift? In your solution of the bonus 2
@Anonymous nuclear repulsion affects both ur guess energy and the exact energy equally. it only shifts the total energy in each case by the same constant value (constant for a given internuclear separation). so it doesn't affect the electronic energy. here we are only looking at the electronic energy. u can include it later, when reporting total energy of the whole molecule, but u don't need it to calculate the electronic energy
Avatar
Anonymous 31-Jul-20 03:12 PM
@Anonymous What do you want to know?
@Anonymous So we have 2 qubits and assume I use the bond length as a parameter of some arbitrary function in the rotation U matrices in the 2 qubits. Not what do I do?
Avatar
Anonymous 31-Jul-20 03:13 PM
@Anonymous
>
So we have 2 qubits and assume I use the bond length as a parameter of some arbitrary function in the rotation U matrices in the 2 qubits. Not what do I do?
@Anonymous I didn't understand 😅
Avatar
Anonymous 31-Jul-20 03:13 PM
*now what do I do?
Avatar
Anonymous 31-Jul-20 03:14 PM
@Anonymous nuclear repulsion affects both ur guess energy and the exact energy equally. it only shifts the total energy in each case by the same constant value (constant for a given internuclear separation). so it doesn't affect the electronic energy. here we are only looking at the electronic energy. u can include it later, when reporting total energy of the whole molecule, but u don't need it to calculate the electronic energy
@Anonymous I kinda get it. I must read the slides again
👍 2
Avatar
Anonymous 31-Jul-20 03:14 PM
@Anonymous So we have 2 qubits and assume I use the bond length as a parameter of some arbitrary function in the rotation U(θ) matrices in the 2 qubits. Now what do I do?
Avatar
Anonymous 31-Jul-20 03:15 PM
@Anonymous
>
So we have 2 qubits and assume I use the bond length as a parameter of some arbitrary function in the rotation U matrices in the 2 qubits. Not what do I do?
@Anonymous This looks more like the steps you do in lab 8
Avatar
Anonymous 31-Jul-20 03:15 PM
Yes but I just want the intuition of why I'm doing it
Mixed arbitrary random states part to begin with... I understand
Avatar
Anonymous 31-Jul-20 03:17 PM
Ah okey. I think I'm not the most adequate person to explain all the details of quantum mechanics. I'm still understanding the stuff about the notation of second quantization and the mapping to qubits
@Anonymous But maybe @Anonymous or @Anonymous may answer your question
Avatar
Anonymous 31-Jul-20 03:18 PM
Cool thanks a lot :) @Anonymous
Avatar
Anonymous 31-Jul-20 03:19 PM
You're welcome
Avatar
Anonymous 31-Jul-20 03:38 PM
Submission of lab is not until 2nd right ??
Avatar
Anonymous 31-Jul-20 03:40 PM
Submission of lab is not until 2nd right ??
@Anonymous Yep, August 2nd 11:59 EST 🙂
Avatar
Anonymous 31-Jul-20 03:43 PM
Thanks
Avatar
Anonymous 31-Jul-20 03:46 PM
thank u @Anonymous @Anonymous @Anonymous for guiding me it was an amazing experience , have learnt a lot from u all
😊 1
Avatar
Anonymous 31-Jul-20 04:01 PM
thank you @Anonymous !!
Avatar
Anonymous 31-Jul-20 04:03 PM
Please help me in lab 9 measurexxcircuit?
Avatar
Anonymous 31-Jul-20 04:07 PM
@Anonymous hi, regarding your question on bond length: the h2 hamiltonian given already includes all that. the 1body integrals have been done for you, see lab8. symmetries have been exploited too, hence only 2 qubits left, see also lab 8. the theta is now a free parameter. you guess, calculate, guess agian, etc. until theta is optimal (if you are lucky and don’t end up in a local min). you also askes about mixed state, what do you mean by mixed?
Avatar
Anonymous 31-Jul-20 04:40 PM
Thanks to all of you @Anonymous
Avatar
Anonymous 31-Jul-20 04:44 PM
@Anonymous Please advise if the following grading output satisfies all specified deliverable requirements. Thank you.
Avatar
Anonymous 31-Jul-20 04:44 PM
Thank you all for this Amazing Summer School, I will never forget it . Great moment
Avatar
Anonymous 31-Jul-20 04:44 PM
Please advise if the following grading output satisfies all specified deliverable requirements. Thank you.
@Anonymous you're all set :) (edited)
Avatar
Anonymous 31-Jul-20 04:48 PM
@Anonymous Thank you! It's been great getting to know all of you virtually. Please connect with me via LinkedIn where we can continue learning together: http://www.linkedin.com/in/yogeshmalhotra . It's been a treat seeing all of you collaborate and work together in this learning community. Hoping to see you again virtually or f2f in a future quantum time-space.
@Anonymous : resending with correct address: Thank you! It's been great getting to know all of you virtually. Please connect with me via LinkedIn where we can continue learning together: http://www.linkedin.com/in/yogeshmalhotra . It's been a treat seeing all of you collaborate and work together in this learning community. Hoping to see you again virtually or f2f in a future quantum time-space.
@Anonymous also let's connect over LinkedIn: would look forward to future learnings together: http://www.linkedin.com/in/yogeshmalhotra .
Avatar
Anonymous 31-Jul-20 05:28 PM
Alright guys! I know i might be a bit late, but I am having trouble with ex1 of lab 9. I am not quite sure what I am doing wrong
I am getting no errors but when I submit, it says ex1-Failed
Can anyone help me out?
Avatar
Anonymous 31-Jul-20 05:29 PM
@Anonymous Check out this thread, and if you have any questions, please let me know 🙂
😃 1
Avatar
Anonymous 31-Jul-20 05:33 PM
@Anonymous Thank you that makes sense
Avatar
Anonymous 31-Jul-20 05:36 PM
@Anonymous Thank you that makes sense
@Anonymous No problem 🙂
Avatar
Anonymous 31-Jul-20 05:36 PM
You rock @Anonymous
😊 1
👍 1
Avatar
Anonymous 31-Jul-20 07:10 PM
great meeting you all...amazing company! Please feel free to connect with my on linkedin: https://www.linkedin.com/in/jaffar-hussain-3414383/
Avatar
Anonymous 31-Jul-20 07:20 PM
I would like all aspirant students in India to consider connecting with me to help build my quantum startup in India http://qulabs.ai with focus on Quantum Internet, PQC and QML. I conducted 3 batches of summer internships in quantum this year (online)! Please feel free to reach out to me on linkedin: https://www.linkedin.com/in/nixonpatel or nixonpatel@Anonymous or nixonpatel@Anonymous
Avatar
Anonymous 31-Jul-20 08:16 PM
anyone had this error in grading cells of lab5?
Avatar
Anonymous 31-Jul-20 08:18 PM
anyone had this error in grading cells of lab5?
@Anonymous Hey, it's recommended to run locally because you would have to import the contents of the folder grading_tools into IBMQ
Have you ran the previous labs on IBMQ?
Avatar
Anonymous 31-Jul-20 08:19 PM
IBMQ.load_account() provider = IBMQ.get_provider(hub='ibm-q')
what about this cell?
do I just skip it?
Avatar
Anonymous 31-Jul-20 08:19 PM
Right before IBMQ.load_account()
IBMQ.save_account('YOURAPITOKENHERE', overwrite=True) (edited)
replace YOURAPITOKENHERE with your API token 🙂
Avatar
Anonymous 31-Jul-20 08:20 PM
oh thank you! 😄
Avatar
Anonymous 31-Jul-20 08:21 PM
@Anonymous Out of curiosity, have you ran previous labs on IBMQ? 🙂 (edited)
Many of us tried, but couldn't get past that error
Which is why they recommended us to run locally lol (edited)
Avatar
Anonymous 31-Jul-20 08:22 PM
This is the first time I run a lab on IBMQ.. just because of that cell
Avatar
Anonymous 31-Jul-20 08:23 PM
Ohhhhh
I seeeee
Avatar
Anonymous BOT 31-Jul-20 08:35 PM
With the Summer School concluding, please send us your feedback!
--- If you have 20 minutes to spare, we appreciate you taking the time to complete our Summer School survey. Not only will it contribute to ongoing research about the Quantum Community, but it is incredibly valued by every member on the team. (As an added bonus, the first 200 respondents to complete our survey will be invited to a Virtual Grad Party hosted by the IBM Quantum team!)
Avatar
Anonymous 31-Jul-20 09:12 PM
Hey, does anyone here have a Mac?
Avatar
Anonymous 31-Jul-20 09:13 PM
hey, so I had a few questions regarding the lab:
can anyone explain the free point system for labs 7,8,9
Avatar
Anonymous 31-Jul-20 09:16 PM
can anyone explain the free point system for labs 7,8,9
@Anonymous lab 9 is not a free point
can anyone explain the free point system for labs 7,8,9
@Anonymous everyone gets points for labs 7 and 8
so there are 9 labs total
Avatar
Anonymous 31-Jul-20 09:17 PM
oh okay, because there is no grading for 7 and 8 so I thought
Avatar
Anonymous 31-Jul-20 09:17 PM
yeah so 2 out of 9 points are already given to us (edited)
Avatar
Anonymous 31-Jul-20 09:18 PM
oh and there is nothing that we need to do about lab 7 and 8 right? like no submission, it;s just for our practice right?
Avatar
Anonymous 31-Jul-20 09:18 PM
No submission, just for practice
Avatar
Anonymous 31-Jul-20 09:19 PM
so I completed 5 labs, first through fifth, and 7 and 8 fvreepoints, does that qualify for a certificate?
and is there somewhere I need to register for one? or just the submissions that were graded right after execution were enough?
Avatar
Anonymous 31-Jul-20 09:19 PM
Yes because that's 7 out of 9 which is above 65%
Submitted were graded when you executed the grading cell
Avatar
Anonymous 31-Jul-20 09:20 PM
yeah I got those outputs right and it says all the work that was graded properly
so I just wait now for my certificate?
👍 1
?
Thank you for answering so much tho!
Avatar
Anonymous 31-Jul-20 09:24 PM
yeah I got those outputs right and it says all the work that was graded properly
@Anonymous yes, you'll get a certificate
Avatar
Anonymous 31-Jul-20 09:32 PM
Thank you to all @Anonymous and @Anonymous for this great summer school . Also to all the Lecturers for providing simple explanation of the concepts. I think thanks to all who have shared for making this learning experience awesome. (edited)
For a beginner like me this was a great platform overview .Thanks to all in this summer school for sharing the knowledge, discussion. It was a great experience to share Quantum knowledge with everyone . Looking forward to connect with you all. http://www.linkedin.com/in/dimplemb
Avatar
Anonymous 31-Jul-20 09:53 PM
Thank you @Anonymous
Avatar
Anonymous 31-Jul-20 10:07 PM
@Anonymous yes I have a mac
Avatar
Anonymous 31-Jul-20 10:08 PM
@Anonymous yes I have a mac
Hi @Anonymous 😀 @Anonymous EL GAILY needed help unzipping a file on Mac, but I'm not sure how to do it (edited)
Avatar
Anonymous 31-Jul-20 10:09 PM
Hi @Anonymous :D
>
@Anonymous EL GAILY needed help unzipping a file on Mac, but I'm not sure how to do it
@Anonymous in mac files get unzipped automatically
Avatar
Anonymous 31-Jul-20 10:10 PM
@Anonymous in mac files get unzipped automatically
@Anonymous nevermind, i think she got it 😄
Avatar
Anonymous 31-Jul-20 10:10 PM
One should download an app called "the unarchiever" from app store
Avatar
Anonymous 31-Jul-20 10:10 PM
One should download an app called "the unarchiever" from app store
@Anonymous Thanks bro 🙂
Avatar
Anonymous 31-Jul-20 10:10 PM
@Anonymous Thanks bro 🙂
@Anonymous your welcome 😁
Avatar
Anonymous 31-Jul-20 10:19 PM
is the lab deadline tonight?
Avatar
Anonymous 31-Jul-20 10:19 PM
is the lab deadline tonight?
@Anonymous Nope, August 2, 11:59 EST
Avatar
Anonymous 31-Jul-20 10:19 PM
thank you
👍 1
Avatar
Anonymous 31-Jul-20 10:33 PM
Is Lab 8 graded?
Avatar
Anonymous 31-Jul-20 10:35 PM
Is Lab 8 graded?
@Anonymous K Nope, it's a freebie
Avatar
Anonymous 31-Jul-20 10:44 PM
was there a way to append gates to the beginning of a circuit?
Avatar
Anonymous 31-Jul-20 10:49 PM
was there a way to append gates to the beginning of a circuit?
@Anonymous Hmm, create the beginning part of the circuit, then append the other portion 🙂
Idk if there's a prepend function lol
Avatar
Anonymous 31-Jul-20 10:52 PM
@Anonymous Thanks! I realized I didn't need it afterall. 😅
👍 1
@Anonymous So you are definitely going to apply and become a qiskit advocate, right?
Avatar
Anonymous 31-Jul-20 10:57 PM
@Anonymous So you are definitely going to apply and become a qiskit advocate, right?
@Anonymous I might apply 🙂
Didn't start the test yet though XD
Avatar
Anonymous 31-Jul-20 10:58 PM
@Anonymous you still have time! Plus you've provided so much support for all the labs 👍
😊 1
Avatar
Anonymous 31-Jul-20 11:16 PM
Is it possible to become Quantum Advocate only onсу a year?
Avatar
Anonymous 31-Jul-20 11:30 PM
I wanna know the same
Avatar
Anonymous 31-Jul-20 11:34 PM
@Anonymous and @Anonymous you can check qiskit.org.
Avatar
Anonymous 01-Aug-20 12:01 AM
@Anonymous I don't feel confident enough to apply for Qiskit Advocate this year. Is it possible to apply next year considering my chances of approving the test may be higher?
Avatar
Anonymous 01-Aug-20 12:12 AM
I've just passed first 5 questions of Quantum Advocate. It was easy.
Avatar
Anonymous 01-Aug-20 12:16 AM
@Anonymous You can apply later too.
Avatar
Anonymous 01-Aug-20 12:17 AM
has anyone the access link to lecture notes 9 pls?
Avatar
Anonymous 01-Aug-20 01:26 AM
has anyone the access link to lecture notes 9 pls?
@Anonymous https://discordapp.com/channels/729706617951485954/729710216702328886/738471374154104883
Avatar
Anonymous 01-Aug-20 02:43 AM
I've just passed first 5 questions of Quantum Advocate. It was easy.
@Anonymous a potential qiskit advocate
Avatar
Anonymous 01-Aug-20 03:53 AM
Will the extended project and QGSS count as two separate contributions for the Advocates program?
Avatar
Anonymous 01-Aug-20 04:34 AM
Is this channel still active for asking questions? In the first lab, we worked on statevector evolution and finding the fidelity of two statevectors. I was wondering whether it is possible to evolve the statevector with some inbuilt noise effect, such as the depolarizing noise model? @Anonymous
Avatar
Anonymous 01-Aug-20 04:37 AM
When will certificates be issued ?
Avatar
Anonymous 01-Aug-20 05:20 AM
@Anonymous can I stop the kernel of qiskit advocate test notebook, after answering a few questions and saving them, without fearing my responses will get deleted ?
Avatar
Anonymous 01-Aug-20 05:21 AM
@Anonymous please post the question in Qiskit Slack.
Avatar
Anonymous 01-Aug-20 05:21 AM
@Anonymous please post the question in Qiskit Slack.
@Anonymous okay
Avatar
Anonymous 01-Aug-20 05:22 AM
@Anonymous You can check noise model in Qiskit Ignis.
@Anonymous HAQ SHAIK It will be announced.
Avatar
Anonymous 01-Aug-20 05:31 AM
Guys anyone of you have done lab 8 last symmetry standing part
Avatar
Anonymous 01-Aug-20 05:55 AM
@Anonymous Yeah, what do you need?
Avatar
Anonymous 01-Aug-20 05:56 AM
@Anonymous Yeah, what do you need?
@Anonymous I need a GF😢 (edited)
Okay I can't remove the last symmetry help me with that, please. I have no clue what to do
Avatar
Anonymous 01-Aug-20 06:07 AM
hi @Anonymous you have to taper the operator
Avatar
Anonymous 01-Aug-20 06:07 AM
will the solution for lab 9 be released?
Avatar
Anonymous 01-Aug-20 06:08 AM
@Anonymous Preis using Z2Symmetries.taper?
(edited)
Avatar
Anonymous 01-Aug-20 06:08 AM
yes
first check the symmetries. that tells you which tapervalues are possible
the argument of taper is the operator
Avatar
Anonymous 01-Aug-20 06:11 AM
ya it shows that taping value is 1 and -1
hai can you send the exact code of that Z2Symmetries.taper that you used
Avatar
Anonymous 01-Aug-20 06:14 AM
I have to get to my computer, give me a minute
@Anonymous do you really want to be spoilered?
Avatar
Anonymous 01-Aug-20 06:20 AM
ya ya no problem
its not like it has come concept in it i just dont know how to use that function
Avatar
Anonymous 01-Aug-20 06:24 AM
I dropped you a message
Avatar
Anonymous 01-Aug-20 06:28 AM
Thanks
Avatar
Anonymous 01-Aug-20 08:17 AM
Are correct answers for labs 1 to 6 enough for a certificate?
Avatar
Anonymous 01-Aug-20 09:06 AM
Are correct answers for labs 1 to 6 enough for a certificate?
@Anonymous Yes
Avatar
Anonymous 01-Aug-20 09:41 AM
ya ya no problem
@Anonymous hey could you share the syntax with me too? I solved it to the extent that you did but I can't seem to figure out how to use that function
Avatar
Anonymous 01-Aug-20 09:42 AM
Will our grades be displayed in the certificate?
Avatar
Anonymous 01-Aug-20 09:46 AM
qubitOp_t1 = pauli_symm.taper(qubitOp_t)[-1]
Avatar
Anonymous 01-Aug-20 09:47 AM
why not Z2Symmetries.taper?
Avatar
Anonymous 01-Aug-20 09:49 AM
Guys where do I find all the lecture notes? Link please
ASAP
Avatar
Anonymous 01-Aug-20 09:50 AM
Guys where do I find all the lecture notes? Link please
@Anonymous the pinned msgs in #resources
Avatar
Anonymous 01-Aug-20 09:50 AM
Thanks!
Avatar
Anonymous 01-Aug-20 09:56 AM
guys guys can the Li-H can be lowered to 4 qubit from 5 qubit as in lab 8
Avatar
Anonymous 01-Aug-20 10:21 AM
maybe, according to https://arxiv.org/pdf/1701.08213.pdf there are 8 symmetries, starting from 12 qubits. is that what you are referring to?
👍 1
quasparticle 1
Avatar
Anonymous 01-Aug-20 10:38 AM
Guys join this discord , to stay in touch even after this server gets deleted. https://discord.gg/JPBPjx
Avatar
Anonymous 01-Aug-20 11:10 AM
do we have to submit something for labs 7 and 8? I finished lab9 but have nothing about 7&8 in my past results
Avatar
Anonymous 01-Aug-20 11:18 AM
SPOILER
import numpy as np from qiskit.quantum_info.operators import Operator, Pauli h = [[-1.0523732, Pauli(label='II')], [0.39793742, Pauli(label='IZ')], [-0.3979374, Pauli(label='ZI')], [-0.0112801, Pauli(label='ZZ')], [0.18093119, Pauli(label='XX')] ] H_m = [] for hi in h: H_m.append(hi[0]*Operator(hi[1])) np.linalg.eigvalsh((H_m[0]+H_m[1]+H_m[2]+H_m[3]+H_m[4]).data)
@Anonymous Hi @Anonymous ...Thanks for a very quick and elegant code... my confusion is how the the Pauli() object works. I see that you only specify the label in the argument. Does the Operator object then know what operator it is automatically from the label, or the order in which it appears in the list? It seems from the doc that one might have to give the z or x label in the argument of Pauli() to clarify?
Avatar
Anonymous 01-Aug-20 11:19 AM
do we have to submit something for labs 7 and 8? I finished lab9 but have nothing about 7&8 in my past results
@Anonymous no submission needed. we all get points for labs 7 and 8
Avatar
Anonymous 01-Aug-20 11:54 AM
Are correct answers for labs 1-5 enough for a certificate?
Avatar
Anonymous 01-Aug-20 11:57 AM
Are correct answers for labs 1-5 enough for a certificate?
@Anonymous yes, because you have 7 out of the 9 points :)
Avatar
Anonymous 01-Aug-20 12:07 PM
@Anonymous There is still a lot of time, submit Lab 6 too
Avatar
Anonymous 01-Aug-20 12:12 PM
@Anonymous can someone confirm that I've submitted my labs successfully?
Avatar
Anonymous 01-Aug-20 12:16 PM
@Anonymous can someone confirm that I've submitted my labs successfully?
@Anonymous if you see this, you're all set and everything has been submitted 🙂
Avatar
Anonymous 01-Aug-20 12:17 PM
I do. But what if someone messed with my code after I submitted the correct answer, will the last answer be saved or the correct answer? @Anonymous
Avatar
Anonymous 01-Aug-20 12:24 PM
I do. But what if someone messed with my code after I submitted the correct answer, will the last answer be saved or the correct answer? @Anonymous
@Anonymous If you really want to make sure, go into one of your lab folders and into grading_tools and delete answers.enc. Then rerun that lab 🙂
Avatar
Anonymous 01-Aug-20 12:25 PM
Um that's why I asked the mentors, but thanks a lot for your help. @Anonymous (edited)
Avatar
Anonymous 01-Aug-20 12:40 PM
@Anonymous When the labs are released to everyone, will the lab videos also be released on YouTube?
Like how the lecture videos are on YouTube... I want to go through everything again in my next vac
Avatar
Anonymous 01-Aug-20 12:59 PM
@Anonymous : when shoudk we submit our name for the final project ?
Avatar
Anonymous 01-Aug-20 01:05 PM
@Anonymous : when shoudk we submit our name for the final project ?
@Anonymous You can find this in !faq 🙂
Avatar
Anonymous 01-Aug-20 01:43 PM
Um that's why I asked the mentors, but thanks a lot for your help. @Anonymous
@Anonymous you can send an email to qiskit.events@Anonymous 🙂
Avatar
Anonymous 01-Aug-20 01:44 PM
Oh ok!
Avatar
Anonymous 01-Aug-20 03:14 PM
Okay guys! I have finished lab 9 now!
😊 1
Is that all I had to do or do I have to send labs through email or anything (just making sure one last time)
Avatar
Anonymous 01-Aug-20 03:15 PM
Okay guys! I have finished lab 9 now!
@Anonymous YAY!!!
You're all set 🙂
Avatar
Anonymous 01-Aug-20 03:16 PM
P.S my bad for the small picture lol
Cool! thanks @Anonymous
On to the final project (after a day of rest lol)
qiskitwhite 1
Avatar
Anonymous 01-Aug-20 05:17 PM
@Anonymous i created a grading cell for 7 and my final results are showing like this would it bean issue ?
Avatar
Anonymous 01-Aug-20 05:18 PM
@Anonymous lab 7 is graded for everyone
Avatar
Anonymous 01-Aug-20 05:21 PM
please have look at the image i have posted it say incorrect
Avatar
Anonymous 01-Aug-20 05:22 PM
No need to submit lab 7 as grading cell is not included and it is graded for everyone
Avatar
Anonymous 01-Aug-20 05:25 PM
actual my reason for confusion is . i understand its graded for every one since its not on digital records for any one but since i created an incorrect response for my self with the validation be based on the records or will 7 be ignored altogether in my case ?
Avatar
Anonymous 01-Aug-20 05:40 PM
Hi. Anyone please confirm , we can send the labworks by 2nd August,11:59 pm EDT?
Avatar
Anonymous 01-Aug-20 05:44 PM
yes
Avatar
Anonymous 01-Aug-20 06:06 PM
Guys Guys i have a question once we made a circuit how to optimize it.
they talked about the methods but never showed how the work
Avatar
Anonymous 01-Aug-20 06:19 PM
Yes
Avatar
Anonymous 01-Aug-20 06:19 PM
Guys Guys i have a question once we made a circuit how to optimize it.
@Anonymous Have you begun to pass the test on Qiskit Advocate ?
Avatar
Anonymous 01-Aug-20 06:20 PM
i havent started the test yet
why do you ask though
Avatar
Anonymous 01-Aug-20 06:21 PM
>
why do you ask though @Anonymous I thought you found the questions on optimization in the test
Avatar
Anonymous 01-Aug-20 06:40 PM
they talked about the methods but never showed how the work
@Anonymous if I remember correctly, the Qiskit textbook has a chapter on VQE, and they cover actual optimization there... I haven't yet tried it out, but the code is displayed in blocks within the chapter section on VQE.
Avatar
Anonymous 01-Aug-20 06:47 PM
ya you are right i forgot about that. Thanks
but i will try using gradient decent myself. Maybe then compare it with the optimizer
Avatar
Anonymous 01-Aug-20 07:15 PM
I saw some Shor's algorithm's implementation uses QFT instead of inverse QFT. Should that work too? Since what we need is phase cancellation, QFT and inverse QFT seem to both have that power except the phase angles are reversed.
@Anonymous it works the same way
Avatar
Anonymous 01-Aug-20 07:28 PM
My submission is not reading the lab 1.what sshould I do.
Avatar
Anonymous 01-Aug-20 07:52 PM
My submission is not reading the lab 1.what sshould I do.
@Anonymous Saxena try to submit lab 1
if it dosent show submitting
try force_commit=True
@Anonymous In lecture 9 and lab 9 we worked with X converted into HZH to get it into Z computational basis. We get any information how to measure if Y comes. Can you please tell us the process
Avatar
Anonymous 01-Aug-20 08:02 PM
No the issue is Lab is submitted and graded but it is not appearing along with lab 2 and other labs
Avatar
Anonymous 01-Aug-20 08:08 PM
Go in lab1 force_commit=True do this and then see if it comes there or not
@Anonymous In lecture 9 and lab 9 we worked with X converted into HZH to get it into Z computational basis. We get any information how to measure if Y comes. Can you please tell us the process
HELP (edited)
Avatar
Anonymous 01-Aug-20 08:33 PM
Where should I submit ??Can you please guide me on the same
Avatar
Anonymous 01-Aug-20 09:03 PM
HELP
@Anonymous try i*XZ, where i is the square root of -1
Avatar
Anonymous 01-Aug-20 09:55 PM
how to install pyscf in anaconda i tried different installation but failed
Avatar
Anonymous 01-Aug-20 10:01 PM
in lab five IBMQ.load_account() provider = IBMQ.get_provider(hub='ibm-q') Do we write our account user name in load account function or do we write API token?
Avatar
Anonymous 01-Aug-20 10:04 PM
@Anonymous is there a way to check if all the labs were submitted correctly and are associeted properly with me? I ran twice the grading box from lab 9 and now it only shows that it is correct but doesnt show all the corrects anymore
Avatar
Anonymous 01-Aug-20 10:05 PM
@Anonymous i did again some of the first labs and I got all my labs checked
Avatar
Anonymous 01-Aug-20 10:06 PM
@Anonymous thanks! I will try to run some of them again!
Avatar
Anonymous 01-Aug-20 10:08 PM
@Anonymous my pleasure. I hope it works!
Avatar
Anonymous 01-Aug-20 10:12 PM
@Anonymous it did, thanks!
🥳 1
Avatar
Anonymous 01-Aug-20 10:15 PM
how to install pyscf in anaconda i tried different installation but failed
@Anonymous it cannot be done if u have installed Anaconda on Windows (10) directly. however, if u have Anaconda installed inside WSL (Windows Subsystem for Linux), I can help u with getting it to run on there... or, better yet, there are instructions by @Anonymous on how to run it on IBM Q and Google Colab using their Jupyter kernels (edited)
Avatar
Anonymous 01-Aug-20 10:15 PM
ok thank you
Avatar
Anonymous 01-Aug-20 10:17 PM
how to install pyscf in anaconda i tried different installation but failed
@Anonymous Google Colab: https://discord.com/channels/729706617951485954/735115703346266172/738662815518162984 WSL: https://discord.com/channels/729706617951485954/732633353471393853/738277215988351006 (edited)
😊 1
Avatar
Anonymous 01-Aug-20 11:25 PM
in lab five IBMQ.load_account() provider = IBMQ.get_provider(hub='ibm-q') Do we write our account user name in load account function or do we write API token?
@Anonymous Elmeligy you have to write api token once only if you haven't done it already then you have to.
Avatar
Anonymous 01-Aug-20 11:27 PM
@Anonymous should it be written here IBMQ.load_account("X?")
Avatar
Anonymous 01-Aug-20 11:27 PM
No it's perfect
If you haven't used IBMQ.save_account("your respectiveapi_token") in your jupyter notebook before then you have to
👍 1
Avatar
Anonymous 01-Aug-20 11:31 PM
Add a coma and the overwrite=True, within the parenthesis
But you only have to use IBMQ.save_account("your respectiveapi_token") once
after that you only use IBMQ.load_account()
Avatar
Anonymous 01-Aug-20 11:33 PM
For full lab credit, this is what our submission history should look like?
Avatar
Anonymous 01-Aug-20 11:34 PM
For full lab credit, this is what our submission history should look like?
@Anonymous yes
🍉 1
🙌 1
Avatar
Anonymous 01-Aug-20 11:37 PM
@Anonymous Thank you so much!! it works
👍 1
Avatar
Anonymous 01-Aug-20 11:38 PM
@Anonymous I did and it gives me this error message.. sorry for bothering you
@Anonymous Elmeligy no need to apologize for that and glad it worked out with help from @Anonymous
Avatar
Anonymous 01-Aug-20 11:38 PM
@Anonymous thank you 🙂
Avatar
Anonymous 01-Aug-20 11:41 PM
@Anonymous thank you 🙂
@Anonymous Elmeligy it's my pleasure also don't be reluctant to ask about any doubts or errors you're having as we're all here to help :)
❤️ 2
👍 2
Avatar
Anonymous 02-Aug-20 12:09 AM
after 7th won't we be able to open the jupyter notebooks which we submitted for our labs ?
Avatar
Anonymous 02-Aug-20 12:41 AM
after 7th won't we be able to open the jupyter notebooks which we submitted for our labs ?
@Anonymous No it is with us forever
Avatar
Anonymous 02-Aug-20 01:10 AM
Cool
Avatar
Anonymous 02-Aug-20 01:44 AM
@Anonymous or anyone ! how does the code we write get executed by the quantum computers at IBMQ? our code gets sent to IBM's servers, but what happens after? are there any kind of quantum compilers at work? how those wires connected to IBM computer connected to "classical" servers?
Avatar
Anonymous 02-Aug-20 02:52 AM
@Anonymous Preis saw your reply to my question real late. But thanks.
@Anonymous hi, regarding your question on bond length: the h2 hamiltonian given already includes all that. the 1body integrals have been done for you, see lab8. symmetries have been exploited too, hence only 2 qubits left, see also lab 8. the theta is now a free parameter. you guess, calculate, guess agian, etc. until theta is optimal (if you are lucky and don’t end up in a local min). you also askes about mixed state, what do you mean by mixed?
@Anonymous Preis By mixed states I meant some form of rotated qubits. Like 0.3 |0> + 0.7 |1> So is there a particular method how we find out the Hamiltonian using the bond length? Is it there in lab8? (I know about the symmetries though and how it was used to reduce the no. of qubits)
Avatar
Anonymous 02-Aug-20 03:05 AM
@Anonymous Being a lab student, its not necessary to enroll in the final project to get the certificate, right ?
👍 3
Avatar
Anonymous 02-Aug-20 03:13 AM
Final project is optional and open for all. (edited)
👍 1
Avatar
Anonymous 02-Aug-20 03:15 AM
@Anonymous try i*XZ, where i is the square root of -1
@Anonymous @Anonymous I think that doesn’t help there. You have to come up with a transformation of the form U^dag Y U (edited)
Avatar
Anonymous 02-Aug-20 03:16 AM
Y is already unitary, u shouldn't need to apply anything more to it, should u? (edited)
Avatar
Anonymous 02-Aug-20 03:18 AM
@Anonymous yes in lab 8 right at the beginning the 1 and 2 body integrals are performed. they take the distance and other things already into account
Avatar
Anonymous 02-Aug-20 03:19 AM
@Anonymous @Anonymous I think that doesn’t help there. You have to come up with a transformation of the form U^dag Y U
@Anonymous Preis what I got after i*XZ was (i * HZHZ)...
will this series of gates work?
without the "i" it is not unitary
🤔 1
but there's a problem in Qiskit textbook (in the Single Qubit States chapter) which asks to write Y in terms of other gates (edited)
and so this is what I get. but i think it also asks to ignore global phases... so i am not sure what to do about the "i"
Avatar
Anonymous 02-Aug-20 03:22 AM
Global phase shifts are unitary operations, and the composition of unitary operations is also unitary, so you can leave out the i
Avatar
Anonymous 02-Aug-20 03:23 AM
@Anonymous the reason for doing the transformation in the first place, is that you want <psi| XX |psi> to transform to <psi |U^dagZZ U|psi>
in lab 9 this is solved by U=HH
Avatar
Anonymous 02-Aug-20 03:24 AM
yeah, but that isn't necessary for all gates, is it?
i mean, it IS for the case of <XX>, but do we do the same for others? i forget...
is U the identity matrix?
also, XX = HZZH, bcoz HH = I (edited)
Avatar
Anonymous 02-Aug-20 03:26 AM
a change of basis is aunitary transformation U |e_i>, this translates to operators as U^dag O U
Avatar
Anonymous 02-Aug-20 03:27 AM
hmmm... then I am thinking now how to transform HZHZ to that form
Global phase shifts are unitary operations, and the composition of unitary operations is also unitary, so you can leave out the i
@Anonymous i get what u say, but XZ gives me a non-unitary matrix. it must be multiplied by "i" to make it unitary. how do I account for that?
without the "i", if we only have "XZ", it won't be a unitary operation
Avatar
Anonymous 02-Aug-20 03:29 AM
Guys i had a doubt, what if a quantum circuit is not unitary, I mean, I get what unitary means, but why every quantum circuits must be unitary??
Avatar
Anonymous 02-Aug-20 03:29 AM
Note, that in the lab 9 circuit the left U^dag part is ommitted, you dont write it in the circuit
Avatar
Anonymous 02-Aug-20 03:29 AM
i'm thinking in terms of a single qubit here
Note, that in the lab 9 circuit the left U^dag part is ommitted, you dont write it in the circuit
@Anonymous Preis i believe we had a H as the unitary operator there... we calculated expectation value of ZZ with respect to (H |psi>)
Avatar
Anonymous 02-Aug-20 03:30 AM
also, XX = HZZH, bcoz HH = I
@Anonymous note that the first H acts on the first the secon on the second qubit in lab 9
👍 1
Avatar
Anonymous 02-Aug-20 03:31 AM
@Anonymous note that the first H acts on the first the secon on the second qubit in lab 9
@Anonymous Preis hmmm... yeah, i think to need to look at it carefully
Avatar
Anonymous 02-Aug-20 03:31 AM
Guys i had a doubt, what if a quantum circuit is not unitary, I mean, I get what unitary means, but why every quantum circuits must be unitary??
@Anonymous you have to preserve probabilities or it gets unphysical
@Anonymous Preis i believe we had a H as the unitary operator there... we calculated expectation value of ZZ with respect to (H |psi>)
@Anonymous exactly
Avatar
Anonymous 02-Aug-20 03:32 AM
@Anonymous you have to preserve probabilities or it gets unphysical
@Anonymous Preis can you explain in a bit detail or refer some resources from where I can learn??
Unphysical means, the qubits lose their superposition nature??
Avatar
Anonymous 02-Aug-20 03:34 AM
@Anonymous exactly
@Anonymous Preis okay, but we definitely know that Y = i * XZ. so are u saying we could never apply the Y gate as "XZ" to a single qubit? bcoz otherwise, without "i", this isn't unitary. and I have no clue how i'd just apply "i" 😕 (tagging @Anonymous as well) (edited)
Avatar
Anonymous 02-Aug-20 03:36 AM
no you don’t describe a sensible system. all measumemt outcome probabilieties have to add up to 100%. after any physical operation this needs to hold again. see lecture 1 @Anonymous
@Anonymous Preis okay, but we definitely know that Y = i * XZ. so are u saying we could never apply the Y gate as "XZ" to a single qubit? bcoz otherwise, without "i", this isn't unitary. and I have no clue how i'd just apply "i" 😕
@Anonymous of course that works, I’m just saying it’s not the gist pf the trafo in lab 9, check out the lecture again
Avatar
Anonymous 02-Aug-20 03:39 AM
@Anonymous of course that works, I’m just saying it’s not the gist pf the trafo in lab 9, check out the lecture again
@Anonymous Preis i was just going to add that I do not get how i'd bring this into a form where i take expectation value of a series of gates that represents serial Y operation(s) with respect to [H |psi>]... I'm guessing that is why "XZ" won't work. u need to sandwich it in between two Hadamard gates... right?
and in this case, u cannot? clearly, i'm missing sthg here...
@Anonymous Preis anyway, thanks for engaging me. just direct me to some reading if this is getting tiring... I sometimes take a while to understand stuff 😬
Avatar
Anonymous 02-Aug-20 03:45 AM
it’s cool, I’ll ping you later @Anonymous
👍 1
Avatar
Anonymous 02-Aug-20 03:55 AM
no you don’t describe a sensible system. all measumemt outcome probabilieties have to add up to 100%. after any physical operation this needs to hold again. see lecture 1 @Anonymous
@Anonymous Preis got it, thanks
Avatar
Anonymous 02-Aug-20 04:57 AM
@Anonymous i have a doubt, since quantum Computers are used to do such computations which take exponentially longer time in classical computer, so how are we able to do those computations in simulators and getting same results as quantum computers(without errors ofcourse)? Sry if i dont make sense
Avatar
Anonymous 02-Aug-20 05:01 AM
@Anonymous R The simulators are limited to about 30 qubits (or many qubits but low entanglement, depending on the type of simulator), and are very slow compared to a quantum computer.
Avatar
Anonymous 02-Aug-20 06:42 AM
@Anonymous and @Anonymous I had a look at the Y gate and how to transform to the z-basis. I will only discuss this for a single qubit. For a generalization to multiple qubits make tensor products. We already know that the Hadamard gets you from the z- to the x-basis, eg. H|0> = |+>. Let us look at S:=u1(pi/2) = [[1,0],[0,i]]. It rotates around the z-axis by a quarter rotation, i.e. we have SH|0>=S|+>=|i>. So let us define U:=SH for the transformation |0> -> |i> and |1> -> |-i>. That means in a circuit you apply H followed by an S gate. Equivalently, we can show that Y=U Z U^dag = S H Z H S^dag. For the definition of S and other gates (in particular the general u3 and its children u1, u2) have a look at https://qiskit.org/documentation/tutorials/circuits/3_summary_of_quantum_operations.html . @Anonymous please correct me, if necessary.
👍 1
Avatar
Anonymous 02-Aug-20 07:31 AM
@Anonymous Preis Thanks
@Anonymous Preis i got u1(pi/2) HZHu1(-pi/2) to be equal to -Y
i guess we will have to compensate this negative sign in our calculation
Avatar
Anonymous 02-Aug-20 07:36 AM
Will the extended project and QGSS count as two separate contributions for the Advocates program?
Avatar
Anonymous 02-Aug-20 07:37 AM
ok. one thing I’m> i guess we will have to compensate this negative sign in our calculation @Anonymous ups, I’ll check again (edited)
Avatar
Anonymous 02-Aug-20 07:43 AM
Xu1(pi/2) HZHu1(-pi/2)X will do the trick
Avatar
Anonymous 02-Aug-20 08:04 AM
or we can do is u1(-pi/2) HZHu1(pi/2)
thats S'HZHS = Y (edited)
Avatar
Anonymous 02-Aug-20 08:14 AM
@Anonymous I'm sure you got something wrong. Note that Y = [[0,-i],[i,0]] furthermore, SH=1/sqrt(2)[[1,1],[i,-i]]; HS^dag = 1/srqt(2)[[1,-i],[1,i]]; Now compute SH Z HS^dag = 1/2 [[0,-2i],[2i,0]] = Y; please check again
Avatar
Anonymous 02-Aug-20 08:36 AM
you got SH wrong
SH = 1/sqrt(2)[[1,i],[1,-i]]
HS' = 1/sqrt(2)[[1,1],[-i,i]]
Avatar
Anonymous 02-Aug-20 08:53 AM
or maybe im wrong
Avatar
Anonymous 02-Aug-20 08:56 AM
I think so. I use S=[[1,0],[0,i]]; H=1/sqrt(2)[[1,1], [1,-1]]; and if I did not forget my matrix multiplication 101 my SH is correct. In my notation I use numpy conventions.
Avatar
Anonymous 02-Aug-20 08:58 AM
okay im an idiot
sorry
Avatar
Anonymous 02-Aug-20 08:59 AM
no you're not. no problem. better know now than never.
Avatar
Anonymous 02-Aug-20 09:08 AM
I got confused in the order of gates.
the way you put gates are in reverse of that you do operator multiplication
Avatar
Anonymous 02-Aug-20 09:10 AM
yes
Avatar
Anonymous 02-Aug-20 09:40 AM
😅
@Anonymous Preis do you have a qiskit tshirt ?
Avatar
Anonymous 02-Aug-20 10:14 AM
@Anonymous for final project do we need to be a part of summer school or anyone can apply?
Avatar
Anonymous 02-Aug-20 10:17 AM
ya you should be a part of summer school
it can be lab or non lab
but a part of QGSS
Avatar
Anonymous 02-Aug-20 10:18 AM
@Anonymous yes only QGSS Attendees.
Avatar
Anonymous 02-Aug-20 10:48 AM
@Anonymous Preis do you have a qiskit tshirt ?
@Anonymous I wished I had (edited)
Avatar
Anonymous 02-Aug-20 10:58 AM
@Anonymous Nope, August 2, 11:59 EST
@Anonymous is it in PM or AM?
Avatar
Anonymous 02-Aug-20 11:06 AM
never mind I got the answer lol
Avatar
Anonymous 02-Aug-20 11:06 AM
@Anonymous is it in PM or AM?
@Anonymous PM :)
👍 1
Avatar
Anonymous 02-Aug-20 12:17 PM
Kindly check out my portfolio: https://play.google.com/store/apps/developer?id=Kadira+Apps I hope you will find it interesting. Thank you.
Enjoy millions of the latest Android apps, games, music, movies, TV, books, magazines & more. Anytime, anywhere, across your devices.
Avatar
Anonymous 02-Aug-20 03:07 PM
@Anonymous Pauli object generates a matrix that is a tensor product of single qubit operators specified by their labels. It is Pauliword and one cannot repeat qubits here. I believe that qiskit does n-1, n-2, ..., 0 order of labels left to right. I hope that it helps
Avatar
Anonymous 02-Aug-20 03:09 PM
Labs
🎊 4
💯 3
@Anonymous Thankyou all for helping me get to this point. I really enjoyed the summer school and it has paved a way to hopefully carve a career out of the knowledge I have gained 😄
Avatar
Anonymous 02-Aug-20 04:58 PM
@Anonymous could you please suggest further bibliography regarding quantum eigensolver techniques?
Avatar
Anonymous 02-Aug-20 05:16 PM
Damn that taper costs a lot of error Energy before taper [-7.88159204+2.82794877e-17j] after reducing 1 qubit using taper [-7.71609053+2.58902009e-17j] error of 0.17, that's too much
any one knows anything about this
should we use it or not
@Anonymous @Anonymous HELP
Avatar
Anonymous 02-Aug-20 05:20 PM
I haven’t done the bonus exercises yet, sorry
Avatar
Anonymous 02-Aug-20 05:20 PM
when we use 2qubit reduction the error is negligible
I haven’t done the bonus exercises yet, sorry
@Anonymous okay. let me know once you are done
i got 7.68 as a answer after optimization using the taped circuit (edited)
Avatar
Anonymous 02-Aug-20 05:38 PM
@Anonymous regarding lab9, I do not understand why we needed to change the circuit for measuring <XX>, could you please explain? moreover, if I calculate the <XX> using as state |psi> = alpha |00> + beta |01> + gamma |10> + lambda |11>, then <XX> = 2alphalambda + 2gammabeta and I cannot write it down as the sum of probabilities. What am I doing wrong? thanks 🙂
Avatar
Anonymous 02-Aug-20 06:06 PM
@Anonymous regarding lab9, I do not understand why we needed to change the circuit for measuring <XX>, could you please explain? moreover, if I calculate the <XX> using as state |psi> = alpha |00> + beta |01> + gamma |10> + lambda |11>, then <XX> = 2alphalambda + 2gammabeta and I cannot write it down as the sum of probabilities. What am I doing wrong? thanks 🙂
@Anonymous hey you need to add hadamard gates to the circuit so you can rotate the basis to the X eigenbasis. Only then can your measurements collapse the qubits onto an X eigenstate to give you some probability values.
👍 1
Avatar
Anonymous 02-Aug-20 06:09 PM
Whenever we make a measurement, we measure in the Z basis
👍 1
So we know that <Z> = <psi | Z | psi>
We want to measure <X>, so we need to find a way to write X in terms of Z (edited)
and we know that X = HZH which you can prove
Then <X> = <psi | X | psi > = <psi | HZH | psi>
which can also be written as
<X> = <psi H | Z | H psi>
which is the reason why we need to add an H to the end of both qubits
Avatar
Anonymous 02-Aug-20 06:13 PM
I was stucked, so I tried to add another Rx(-pi/2) followed by Ry(pi/2) on each qubit after the hets circuit, and surprisingly it works. 😆
I guess Rx(-pi/2) followed by Ry(pi/2) = H gate?
Avatar
Anonymous 02-Aug-20 06:30 PM
@Anonymous Pauli object generates a matrix that is a tensor product of single qubit operators specified by their labels. It is Pauliword and one cannot repeat qubits here. I believe that qiskit does n-1, n-2, ..., 0 order of labels left to right. I hope that it helps
@Anonymous Thanks @Anonymous I was trying to look for this thing in the documentation, but could not find any specific reference to Pauliword, but that clears up things a bit.
Avatar
Anonymous 02-Aug-20 06:40 PM
@Anonymous thanks for answering! I understand now but I have one last question, why do we have to measure in the Z basis?
Avatar
Anonymous 02-Aug-20 06:56 PM
@Anonymous thanks for answering! I understand now but I have one last question, why do we have to measure in the Z basis?
@Anonymous Qiskit only allows us to measure in the Z-basis, I believe because of practical reasons in implementation, we can only measure in a single basis
👍 1
To get measurements in another basis, all you need to do is apply gates before the measurements 🙂
Avatar
Anonymous 02-Aug-20 07:17 PM
RX Gate
RY Gate
@Anonymous Interesting, I don't think RX(-pi/2)RY(pi/2) = H?
Yeah, I had to check above. But, H = RY(-pi/2) X, shown below (edited)
Avatar
Anonymous 02-Aug-20 07:26 PM
I am very confused about how to complete Lab 9. For exercise 1, what exactly are we supposed to do for the XX measurement besides measure_all()? Looking back at the ZZ measurement, this is all we needed to do since the HETS circuit was set up...
Avatar
Anonymous 02-Aug-20 07:27 PM
I am very confused about how to complete Lab 9. For exercise 1, what exactly are we supposed to do for the XX measurement besides measure_all()? Looking back at the ZZ measurement, this is all we needed to do since the HETS circuit was set up...
@Anonymous See https://discordapp.com/channels/729706617951485954/732633353471393853/739605747456802836 Let me know if you have any questions 🙂
Avatar
Anonymous 02-Aug-20 07:28 PM
So it's a Hadamard sandwich with the measure_all() inside?
Avatar
Anonymous 02-Aug-20 07:30 PM
Just a Hadamard gate right before measure_all() happens :)
💯 1
Avatar
Anonymous 02-Aug-20 07:31 PM
Anybody knows whether the final project will be supervised by one of Qiskit advocates or not?
Avatar
Anonymous 02-Aug-20 07:52 PM
@Anonymous Interesting, I don't think RX(-pi/2)RY(pi/2) = H?
@Anonymous
Avatar
Anonymous 02-Aug-20 07:53 PM
oh nice! 😄
Avatar
Anonymous 02-Aug-20 07:54 PM
I also unsure what is going on, but since the grading say it is correct. I guess it is correct?
or to be safe I should just use H gate like the lab answer given.
Avatar
Anonymous 02-Aug-20 07:55 PM
Nah, it successfully submitted 🙂
I was just questioning lol XD
Avatar
Anonymous 02-Aug-20 07:56 PM
Nah it is fine, we are all learning.
Thanks btw.
Avatar
Anonymous 02-Aug-20 07:57 PM
Thanks btw.
@Anonymous No problem 🙂
Avatar
Anonymous 02-Aug-20 08:38 PM
Hey anyone know nice settings for jupyter notebook jupyterthemes , i need similar to original jupyter just with a dark theme like monokai. what i saw was after applying themes some buttons get dissapear and it looks different.
Avatar
Anonymous 02-Aug-20 09:31 PM
I am still struggling with removing the last symmetry of Lab 8. I think that I need to use the Z2Symmetries.taper(operator,tapering_values=None) function but can't work out what parameters to pass in to it. I think that the operator would be qubitOp_t and thought that the tapering_values should be something like [1,-1] or [1] or [-1] or ??? Can't get anything to work. Keep getting error messages like "'WeightedPauliOperator' object has no attribute '_symmetries'". @Anonymous or anybody with insights? Please can I get some help. Thanks.
Avatar
Anonymous 02-Aug-20 09:52 PM
when I submit lab3 and lab5 for grading, it is only said that my labs are correct, but did not submit the labs. Does anyone face the same situation?
Avatar
Anonymous 02-Aug-20 09:57 PM
when I submit lab3 and lab5 for grading, it is only said that my labs are correct, but did not submit the labs. Does anyone face the same situation?
@Anonymous for both labs, go into your grading_tools folder, delete answers.enc, and then rerun
Avatar
Anonymous 02-Aug-20 10:01 PM
@Anonymous thank you very much. It works. Do I always need to delete answers.enc after each time re-running my code so that the answer is updated?
after deleting answers.enc, my lab5 is submitted but it appears that: Our records, so far, are: Correct answers: lab5:ex1
previsouly my other labs are in record also
I don't know why
Avatar
Anonymous 02-Aug-20 10:03 PM
oh shoot wait that might mean your name and email don't match previously (edited)
it's case sensitive as well
your previous labs should show up
Avatar
Anonymous 02-Aug-20 10:06 PM
thanks a lot. Yes I did put 2 different emails. After using the same email, all my labs apprear in the same record now. You save me !!!
Avatar
Anonymous 02-Aug-20 10:07 PM
thanks a lot. Yes I did put 2 different emails. After using the same email, all my labs apprear in the same record now. You save me !!!
@Anonymous you're welcome :)
💯 3
Avatar
Anonymous 03-Aug-20 03:59 AM
@Anonymous You should call this function from a Z2Symmetries instance, i.e pauli_symm.taper(operator, tapering_values=[1])
Avatar
Anonymous 03-Aug-20 07:27 AM
@Anonymous Would the certificates of the summer school be mailed to us? And when shall it be available?
Avatar
Anonymous 03-Aug-20 07:37 AM
@Anonymous You should call this function from a Z2Symmetries instance, i.e pauli_symm.taper(operator, tapering_values=[1])
@Anonymous and all remember tapering_value = [-1] will also work but gives a marginal error compared to [1]
tapering value = [1] will give E = -7.88 but tapering value = [-1] will give E = -7.71
Avatar
Anonymous 03-Aug-20 09:14 AM
Qiskit discord will remail until when?
Avatar
Anonymous 03-Aug-20 09:57 AM
Qiskit discord will remail until when?
@Anonymous August 7th at 11:59 PM EDT
Avatar
Anonymous 03-Aug-20 02:15 PM
@Anonymous @Anonymous ... I wanted to know if there is an online resource to set up a CPMG kind of experiment, based on what we have learnt in the school so far.
@Anonymous Diz Several people have indicated that the notes for Lecture 9 are incomplete due to missing handwritten portions. Would it be possible to complete these notes (with Abhinav's help) before the notes/server/lectures are taken down?...
Avatar
Anonymous 03-Aug-20 02:28 PM
Hey Nilay + Doug Unfortunately because of how the notes were saved and transferred over, we lost the handwritten notes
If you rewatch the lecture, you should be able to fill them in on your own!
@Anonymous
Avatar
Anonymous 03-Aug-20 03:04 PM
ah no i missed the sign up for the project (edited)
what do i do
Avatar
Anonymous 03-Aug-20 08:18 PM
Hi, I hace a doubt I know that Josephson junctions hace nonlinearity, and for this reason, they, un depending no the fabricaron parámetros, have a chaotic behaviour or nonchaotic behaviour. Which types of junctions are used for qubits? Chaotic ir non-chaotic?
Avatar
Anonymous 03-Aug-20 08:47 PM
@Anonymous @Anonymous Thanks so much for your help. Seems obvious once it is pointed out! Much appreciated. Agree with your numbers.
Avatar
Anonymous 03-Aug-20 10:51 PM
Hi. This is from lecture 2 on Grover's Algorithm. Is there a way to implement phase oracle Uf as the way its in the lecture note in qiskit?
Avatar
Anonymous 04-Aug-20 04:24 AM
Is there another discord where we can continue the discussions after this is taken down?
Avatar
Anonymous 04-Aug-20 04:48 AM
I have easy but confusing qns. What is: 1) difference btn quantum states and qubit states? 2) difference btn normalised pure state anf general state of a qubit ( the one with alpha times state 0 plus beta times state 1) 3)we have unitary gates, unitary matrices, but what is the meaning of the word unitary? 4) difference between a cnot gate and sigma x gate, since they both flip?
Avatar
Anonymous 04-Aug-20 04:51 AM
I can attempt to solve some of those.
3) unitary gates can be written in the form of unitary matrices and unitary matrices are the ones for which this statement is true:
U(dagger)=U(inverse)
4) the difference between a cnot and an X is that the first one is a controlled operation. Meaning that it onlu flips the target qubit iff the controlqubit is in state |1>
ON the other hand X is a one qubit gate and always flips the qubit it is applied on
2) I don't know if I am understanding you correctly, but a general state must be normalised. That means (\alpha^2+\beta^2=1). I don't know what do you mean by "pure".
1) I am not sure about this one. But this is what I think: if you have a system with one qubit, your qubit states are your quantum states. However, if your circuit has more than one qubit, your quantum states involve all your qubit states.
I hope it was of some help... 😅
💯 2
Avatar
Anonymous 04-Aug-20 07:46 AM
Hey anyone know nice settings for jupyter notebook jupyterthemes , i need similar to original jupyter just with a dark theme like monokai. what i saw was after applying themes some buttons get dissapear and it looks different.
@Anonymous R i use visual studio code....
Avatar
Anonymous 04-Aug-20 08:48 AM
I have easy but confusing qns. What is:
>
1) difference btn quantum states and qubit states? 2) difference btn normalised pure state anf general state of a qubit ( the one with alpha times state 0 plus beta times state 1) 3)we have unitary gates, unitary matrices, but what is the meaning of the word unitary? 4) difference between a cnot gate and sigma x gate, since they both flip?
@Anonymous @Anonymous has answered 3, 4 and 2, I shall answer 1 and clarify 2 2) both are same, normalised pure state means either it's |0> or |1>. They are also normalised. The general states with alpha and beta are also normalised. 1) quantum states are either |0> or |1>, its like this state or that state, ground state or excited state. Qubit state refers to the current state of a qubit. When you write a qubit as alpha |0> + beta |1>, that's the current state of a qubit
Avatar
Anonymous 04-Aug-20 09:04 AM
VQE needs to do many valuations of <psi|H|psi>. e.g. For each iteration, two valuations are needed to enable a gradient to be obtained. And there are many (a few hundred?) iterations. And all this may need to be repeated for each of the noncommuting Pauli strings. My question is: when we run this algorithm is there any way to stop it taking a long time due to sending individual valuations to the real quantum hardware (waiting for them to get to the front of the queue which can take minutes), obtaining the result and then sending off the next valuation? So ultimately obtaining a single VQE result can take hours, even for a very simple example. Am I missing something here? @Anonymous or any other helpful people
Avatar
Anonymous 04-Aug-20 09:05 AM
ON the other hand X is a one qubit gate and always flips the qubit it is applied on
@Anonymous can you give me an example of a two qubit gate that flips?
Avatar
Anonymous 04-Aug-20 09:05 AM
I guess you can send the two valuations required to calculate the gradient into the queue at the same time. But you then need the results to determine the updated parameters before you can send the next valuations...
Avatar
Anonymous 04-Aug-20 09:33 AM
@Anonymous A Cnot gate is a gate of two qubits. One of them is the control qubit and the other one is the target qubit. The gate flips the target qubit when the control qubit is in state |1>.
Avatar
Anonymous 04-Aug-20 09:42 AM
@Anonymous what you describe is right. I somehow remember that Aqua contains functions to manage jobs submission, but can't find anything like it now. Closest is related parameters in QuantumInstance that allow monitoring the status of jobs. I also think (not sure) that in the future there will be "holistic VQE" that will address what you say.
Avatar
Anonymous 04-Aug-20 12:08 PM
! schedule
Avatar
Anonymous BOT 04-Aug-20 12:08 PM
!schedule - Show important dates and times
The Fun Doesn't End with the Summer School Other dates and times relevant to your interests in the week to come! All Lab Exercises Due Sunday, August 2 - 11:59 PM EDT | !! *No late notebooks will be accepted !!* Lab Content Available for All Summer School Students Tuesday, August 4 | Updates will be posted in #announcements Sign Up Deadline for the Final Project Monday, August 3 - 10:00 AM EDT | Sign up here! The Final Project Kicks Off with Teams! Wednesday, August 5 - 10:00 AM EDT Final Project Concludes with Showcase Gallery & Recognitions Friday, August 7 - 10:00 AM EDT Discord Server is Shut Down Friday, August 7 - 11:59 PM EDT | Join the Qiskit Slack Be a part of the Qiskit Slack Community to keep the Quantum conversation going, stay up to date on the latest updates, and keep in touch with Summer School Alumni! Qiskit Advocate Applications Close Friday, August 14 - 11:59 PM EDT | Learn More and Apply Here! Did you know? Summer School lab participation and the Final Project can count as one of the contribution requirements!!
Avatar
Anonymous 04-Aug-20 01:26 PM
For Transmons (maybe in general for Superconducting Qubits) why is the amplitude of the pulse varied to control the qubit's rotation angle rather than varying the pulse duration ? Variation of the pulse duration is quite common for spin based quantum systems - NMR, NV Centers, Quantum Dot so why not for Superconducting qubits ?
👍 1
Avatar
Anonymous 04-Aug-20 02:20 PM
Hi. This is from lecture 2 on Grover's Algorithm. Is there a way to implement phase oracle Uf as the way its in the lecture note in qiskit?
@Anonymous that pict you sent is circuit for Deutsch-Jozsa algorithm and not Grover's algorithm
Avatar
Anonymous 04-Aug-20 02:58 PM
@Anonymous hi! 😄 Is there any update about the Final Project? Teams will be confirmed tomorrow?